{"_id":"@safe-global/safe-apps-sdk","_rev":"23-197668648cbc5a74d3a6ae0b0529fbae","name":"@safe-global/safe-apps-sdk","dist-tags":{"next":"9.0.0-next.1","latest":"9.1.0"},"versions":{"7.9.0":{"name":"@safe-global/safe-apps-sdk","version":"7.9.0","keywords":["Safe","sdk","apps"],"author":{"url":"https://safe.global","name":"Safe"},"license":"MIT","_id":"@safe-global/safe-apps-sdk@7.9.0","maintainers":[{"name":"dasanra","email":"daniel@safe.global"},{"name":"katspaugh","email":"katspaugh@gmail.com"},{"name":"med3000","email":"ahmed.osman1312@gmail.com"},{"name":"mikheevm","email":"mmvsha73@gmail.com"},{"name":"germartinez","email":"germaga92@gmail.com"},{"name":"luarx","email":"renol_siete@hotmail.com"},{"name":"rmeissner","email":"richard@safe.global"}],"homepage":"https://github.com/safe-global/safe-apps-sdk#readme","bugs":{"url":"https://github.com/safe-global/safe-apps-sdk/issues"},"dist":{"shasum":"0c79a7760470bfdaf4cce9aa5bceef56898c7037","tarball":"https://registry.npmjs.org/@safe-global/safe-apps-sdk/-/safe-apps-sdk-7.9.0.tgz","fileCount":90,"integrity":"sha512-S2EI+JL8ocSgE3uGNaDZCzKmwfhtxXZFDUP76vN0FeaY35itFMyi8F0Vhxu0XnZm3yLzJE3tp5px6GhuQFLU6w==","signatures":[{"sig":"MEUCIGWzDIY1z3cfOwTNzHC8rNwLT17oshmGTzuj++Fnx7DsAiEAg12ZNtb4gzaJYu/Iv0sMY0SpcpG6BYpq7amPnh2Lvjo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":146737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0qxoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoaZw//aDyTA/WrKz/2y8DnZx0wdQWJpcHJxwpfaRJj3nw4rzn91KAY\r\np8A9c1c3168stiaJboH753Y2tT0eHDYtZboAeZtLw4K258sdy0MByYTZWdqP\r\nWsa+U4gkJv6nZLhSfeMwOob5yZ3YEijSXbLe6/YdRRUoxYgVqK+m3WcCvLlr\r\nwSQyUAheKR8smWKEc7684ukuI6Gyw18blSOWZVPoCZ4sLIQmbBI+7cQ9sti6\r\nfq1fnj+dvDhXgqMx8DDp0Uj9kMy0wAFTd8d1WU8ggG4vNAuIUTjt2L6/iUm8\r\nIXvGZnk/9vtEbRDLv18qHqAhwkmFvxyHfthxpAkjvt+jAlDBHFpMDAt6LZJ8\r\nSW0sNgMSldL2vYPbC6HZNNswOaQDZwvzkh8oqm6Ct+llArCdyY3wSz/g5Nas\r\nL4v18C6LEdRWBp4x8s8y67TgKTs8jAFJCFsKMLREEwhvfILlvQhJJX/fIQkD\r\nBqxUc3iVPDUnAIjYC1wOhTfoWjCVJxk3rC4ROf+lwG/XcTdMZYjYR+fmMuIx\r\nJ/9GbL4NiWd/vaXfBTjr8Af4z8LG9a8uLqHVX5FsHPepSXNja5koHXjEf3b2\r\nmeShFJoHlbYGQ3usLovSE3epslDnD/atdcClEAc7E6pCR9OPDW0iNSD3Ec2y\r\nAZNY2qUClsggb8G882s80f7tflWATSu1ezw=\r\n=kzJy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/src/index.js","gitHead":"506b4655e0d98490e112c449bc2a13945590ea90","scripts":{"test":"jest","build":"yarn rimraf dist && tsc && yarn format-dist","format-dist":"sed -i '' 's/\"files\":/\"_files\":/' dist/package.json"},"typings":"dist/src/index.d.ts","_npmUser":{"name":"dasanra","email":"daniel@safe.global"},"repository":{"url":"git+https://github.com/safe-global/safe-apps-sdk.git","type":"git"},"_npmVersion":"8.19.3","description":"SDK developed to integrate third-party apps with Safe app.","directories":{},"_nodeVersion":"18.13.0","dependencies":{"ethers":"^5.7.2","@safe-global/safe-gateway-typescript-sdk":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/safe-apps-sdk_7.9.0_1674751080292_0.9886519136092142","host":"s3://npm-registry-packages"}},"7.10.0":{"name":"@safe-global/safe-apps-sdk","version":"7.10.0","keywords":["Safe","sdk","apps"],"author":{"url":"https://safe.global","name":"Safe"},"license":"MIT","_id":"@safe-global/safe-apps-sdk@7.10.0","maintainers":[{"name":"dasanra","email":"daniel@safe.global"},{"name":"katspaugh","email":"katspaugh@gmail.com"},{"name":"med3000","email":"ahmed.osman1312@gmail.com"},{"name":"mikheevm","email":"mmvsha73@gmail.com"},{"name":"germartinez","email":"germaga92@gmail.com"},{"name":"luarx","email":"renol_siete@hotmail.com"},{"name":"rmeissner","email":"richard@safe.global"}],"homepage":"https://github.com/safe-global/safe-apps-sdk#readme","bugs":{"url":"https://github.com/safe-global/safe-apps-sdk/issues"},"dist":{"shasum":"e75fc581126f27c52ec2601da51bca5eb99b61f4","tarball":"https://registry.npmjs.org/@safe-global/safe-apps-sdk/-/safe-apps-sdk-7.10.0.tgz","fileCount":90,"integrity":"sha512-is0QAHVoGkP06YfOPcp4X3/YUEA3wRdgFUyKZ4rT47uOEnzxA9Sm8BFJrIZqZOjjqC+aJXRMF0cE2qucS953rg==","signatures":[{"sig":"MEUCIQCxhT2LzS/TRxHoxPvgkqDU+vOpwFm1EkLekoI6Q4495QIgJRMpggE7xb+44frsqB4ajtEmDn7E8waxr3CNC2B1iko=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":151455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj67AHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqm9w/+JNczmYC/+O+G7POPZjete2q8X8YMacdOemZHlAYvT3w00nQJ\r\nkGxNYfTkSMY5/+KxCqgiljiXyPnHowmBzDgMbsV5bU03ylTGoThZG9kZ2tnf\r\nr3YBUIRuuv6mZeNfiYQoQPDevUhiUL4wPV7S5jUuHta7dGyLM9Iwmvj22bhn\r\niolcXS+AVF6+/C6FaTdG1Ra0h1g5Ahi4X0kqaw29LLepjOXX9kdzChto755I\r\nCQmLQN/mzmmN4v/4M3imwGwDg/zFv4WopoVql7cIdL5Y6xnEYEFzO/DgkQfO\r\nxFg7JFNL4vxQfg/+rZ6TwJcvwJ8CXgKHwNNfh/vvByOs7Z8OJSYJdOiCfs8J\r\n3vjHDwbCQUz7hSn25bRvFP8Z+9Wk5ynOjpL92qSj8cabyL2dk231MockYnsz\r\nYFch90FMXtnFC34QrWYVHqoHo0tBrLUXPTp9NmvKnKv2VVBwxNBaS4+j2R15\r\nzzFnFagNr0XWS7EwmyvHpr8OhZMxyQ/c6uDOhjyPZtmKr8NmxKB4jIEIkiq0\r\nCAOV4lciTDGREI//WVb4nnTRY6jdKMOnw5wwLL7jzzy1lGGUt4yk3oPWMRk9\r\nZ3hquqW+7EQ6IOxDbv4Gao29Xv0/1Kn4TXoo3PC1pcM+nHNw9Aee/6M0Lm4v\r\nXty0yMSyM0bzB3/fVhLRqGas0BVBhxGped0=\r\n=Vl2v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/src/index.js","gitHead":"5bc7d9d55d6dfc02d705fd5b63f8dd64827c87fd","scripts":{"test":"jest","build":"yarn rimraf dist && tsc && yarn format-dist","format-dist":"sed -i '' 's/\"files\":/\"_files\":/' dist/package.json"},"typings":"dist/src/index.d.ts","_npmUser":{"name":"dasanra","email":"daniel@safe.global"},"repository":{"url":"git+https://github.com/safe-global/safe-apps-sdk.git","type":"git"},"_npmVersion":"8.19.3","description":"SDK developed to integrate third-party apps with Safe app.","directories":{},"_nodeVersion":"18.13.0","dependencies":{"ethers":"^5.7.2","@safe-global/safe-gateway-typescript-sdk":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/safe-apps-sdk_7.10.0_1676390407302_0.4952999102035047","host":"s3://npm-registry-packages"}},"7.10.1":{"name":"@safe-global/safe-apps-sdk","version":"7.10.1","keywords":["Safe","sdk","apps"],"author":{"url":"https://safe.global","name":"Safe"},"license":"MIT","_id":"@safe-global/safe-apps-sdk@7.10.1","maintainers":[{"name":"dasanra","email":"daniel@safe.global"},{"name":"katspaugh","email":"katspaugh@gmail.com"},{"name":"med3000","email":"ahmed.osman1312@gmail.com"},{"name":"mikheevm","email":"mmvsha73@gmail.com"},{"name":"germartinez","email":"germaga92@gmail.com"},{"name":"luarx","email":"renol_siete@hotmail.com"},{"name":"rmeissner","email":"richard@safe.global"}],"homepage":"https://github.com/safe-global/safe-apps-sdk#readme","bugs":{"url":"https://github.com/safe-global/safe-apps-sdk/issues"},"dist":{"shasum":"debb5d69634fe9d8ef8e03f6d1cc9384f92324ab","tarball":"https://registry.npmjs.org/@safe-global/safe-apps-sdk/-/safe-apps-sdk-7.10.1.tgz","fileCount":91,"integrity":"sha512-2imnqAbx9XrqT3psrhe/YVpj2yW840ngJIuqv0nTiWJLKcTCzM2LJ4MH7ir7H8Sp2wdG/BqNB3SvjUAks2qNjQ==","signatures":[{"sig":"MEUCIQD52xATH9hLNbG5hEFFczIdGBcxNZ12W/hbFExmYVf6VQIgA5zzjuvYmc5zFWoJJRvy4R4mLI9rnWxCDlWgp8XEF8U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152196,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkEdMTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoN7A//d7ufDXOX/ZphJO3GvvWwhnxvspO8IOhgQG4n6b4C7IXIAcUI\r\nhSmPJKEEB2QzLoMoY975NtvdqYkGzxcnLlX+KkgxloktLqrP2Y2fI1lEB22B\r\nFQ6xTKPgNCIQTCZx7N5jOabPesPxsNjz+2JmpXgzAtWYIsxBSiGpOhV0/Ykb\r\nZZsBFHIK/QOiAilpGBW4Es14wbf00o0sGHRC+wWgzXAXIeONRSxR6U/nfNtz\r\nQX0It/gEsJaDIEDzcF8mPZnKbAMLbe23HKD0XjEq/PW2PzHxpHHkHFLqBg91\r\n8rrVAZb81zNl8dgZWdF6Sfr4ElPxMS/l2MfNRQIQkiF9S7/Jw3dlANI2f1BP\r\nvylML5GdwVqsA6DZCKeA+qrV/R7B4Avv/hP3eAtXmMUtjwsLxnvDNArKigHV\r\nUhDnXIcfF/UPC45upjcmLyt4Pg2o1mGrGR6VwT8wgS1yF2EPN911P/OPAqm7\r\nPgVKKPdhIZ883wzdTdxjSDIwSgIuqlCGr1fweZlkLUWVFDGvcZQXXVzp0B+2\r\n0/3cQWa0cvxXcofAgSDNYZ5GLX/sWc8Ud1YdU0iHRogifW5/SyVQgCPnxFvi\r\nh4cJGOEuHl3ad7ebJXeZZGIqga5ZfpO8ld0ZaBeIkFslfQy045UDctv0SEeg\r\ntjAtJRH1vuzUXX5Lwv8bS4rsMSn37/rkTm4=\r\n=mg30\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/src/index.js","gitHead":"d7592195aba057e617e443092925e7eefa0bd63d","scripts":{"test":"jest","build":"yarn rimraf dist && tsc && yarn format-dist","format-dist":"sed -i '' 's/\"files\":/\"_files\":/' dist/package.json"},"typings":"dist/src/index.d.ts","_npmUser":{"name":"katspaugh","email":"katspaugh@gmail.com"},"repository":{"url":"git+https://github.com/safe-global/safe-apps-sdk.git","type":"git"},"_npmVersion":"9.5.0","description":"SDK developed to integrate third-party apps with Safe app.","directories":{},"_nodeVersion":"18.15.0","dependencies":{"ethers":"^5.7.2","@safe-global/safe-gateway-typescript-sdk":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/safe-apps-sdk_7.10.1_1678889747394_0.7582117914868705","host":"s3://npm-registry-packages"}},"7.11.0":{"name":"@safe-global/safe-apps-sdk","version":"7.11.0","keywords":["Safe","sdk","apps"],"author":{"url":"https://safe.global","name":"Safe"},"license":"MIT","_id":"@safe-global/safe-apps-sdk@7.11.0","maintainers":[{"name":"dasanra","email":"daniel@safe.global"},{"name":"katspaugh","email":"katspaugh@gmail.com"},{"name":"med3000","email":"ahmed.osman1312@gmail.com"},{"name":"mikheevm","email":"mmvsha73@gmail.com"},{"name":"germartinez","email":"germaga92@gmail.com"},{"name":"luarx","email":"renol_siete@hotmail.com"},{"name":"rmeissner","email":"richard@safe.global"}],"homepage":"https://github.com/safe-global/safe-apps-sdk#readme","bugs":{"url":"https://github.com/safe-global/safe-apps-sdk/issues"},"dist":{"shasum":"2cbc164fb70141cdf4d3331ff222cd98a2529316","tarball":"https://registry.npmjs.org/@safe-global/safe-apps-sdk/-/safe-apps-sdk-7.11.0.tgz","fileCount":91,"integrity":"sha512-RDamzPM1Lhhiiz0O+Dn6FkFqIh47jmZX+HCV/BBnBBOSKfBJE//IGD3+02zMgojXHTikQAburdPes9qmH1SA1A==","signatures":[{"sig":"MEQCIFpu06ycpx21dGQ9bd3QtgMgmiJY2Vyc3o0gJep1AOFnAiAx6GhVYdDUCCYR8lKexXH30kYDySzXuIruEdATojHqwg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152388,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkU9MuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoujA/+NRPmQUE3mn/7ET7PDQTHROWiYXAxyIHBMYf5CX2/F2gJKIaZ\r\nnI8XTxto7qAP+LmRrlKPKIEhgQLpKEOseTEeM2mFbx9IhScRbBv0xGz8a6y6\r\n4Qlua9Gyf3MH4laxkLn5dVtpUsiF3rMsu0tCu2k4iNL+8j9rT+EFcwoee+vs\r\nI9oebQq3GG/XzYiAAJX1kk9qmoS76E3C6uhpUDiDAxbUe1tnDlF1dBf1DNxi\r\n1bUGbXtfDT8Q7clvMNYNJrwP+8snPLYrybTwLj5FCjlepgKp8OTJ7txvYhj7\r\nZEh7mPUiS/mtSY5XxxiImam+CLIA8bQ6TkdzXuoPOehoT/sL+ZkBYWYkSNsc\r\nbiiXJ6wSkdRVisLqYDCHhfVqcLtAtmZRVGrOFg94bpu4NEjW2qtDuhkUCqWG\r\n59NX3CvKWHvu37M7IlUpNXCP+Yf76AMTXWT3/cEmwCqoxHYuaS0+rW6Fu9iR\r\npZ+E0HYPkuwgJYF+Caen/eONIvixdLxphdE/UG0idKvVOMWMg36OUusAGPbu\r\nW0+gt3Pd2SOnxL1L0xsJbk6qZGWPKvQC41OWFJ/qhC4ltyk2QlrF5wRlB0Fb\r\nejVgE2WMt865HFfqg8g+NJhEOjBN+InX2cjyAeEblSBOiNLPtqw4FeCZ4+Yr\r\neLE3GENjvh43PlKeUzAQYDzKZKldHubotYQ=\r\n=XAH8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/src/index.js","gitHead":"0cf10f735e0ef434613d431411fd581e9a770467","scripts":{"test":"jest","build":"yarn rimraf dist && tsc && yarn format-dist","format-dist":"sed -i '' 's/\"files\":/\"_files\":/' dist/package.json"},"typings":"dist/src/index.d.ts","_npmUser":{"name":"dasanra","email":"daniel@safe.global"},"repository":{"url":"git+https://github.com/safe-global/safe-apps-sdk.git","type":"git"},"_npmVersion":"9.5.0","description":"SDK developed to integrate third-party apps with Safe app.","directories":{},"_nodeVersion":"18.15.0","dependencies":{"ethers":"^5.7.2","@safe-global/safe-gateway-typescript-sdk":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/safe-apps-sdk_7.11.0_1683215150554_0.9677443391177092","host":"s3://npm-registry-packages"}},"8.0.0":{"name":"@safe-global/safe-apps-sdk","version":"8.0.0","keywords":["Safe","sdk","apps"],"author":{"url":"https://safe.global","name":"Safe"},"license":"MIT","_id":"@safe-global/safe-apps-sdk@8.0.0","maintainers":[{"name":"germartinez","email":"germaga92@gmail.com"},{"name":"dasanra","email":"daniel@safe.global"}],"homepage":"https://github.com/safe-global/safe-apps-sdk#readme","bugs":{"url":"https://github.com/safe-global/safe-apps-sdk/issues"},"dist":{"shasum":"9bdfe0e0d85e1b2d279bb840f40c4b930aaf8bc1","tarball":"https://registry.npmjs.org/@safe-global/safe-apps-sdk/-/safe-apps-sdk-8.0.0.tgz","fileCount":95,"integrity":"sha512-gYw0ki/EAuV1oSyMxpqandHjnthZjYYy+YWpTAzf8BqfXM3ItcZLpjxfg+3+mXW8HIO+3jw6T9iiqEXsqHaMMw==","signatures":[{"sig":"MEUCIA19/NzFB4df7QXWNwYnHh4JyWkpUdKY4tqNcvi7PxIgAiEAzOnCprVDTLHndg7A61ZqcsxRp4KAThoJDmgP5Ywnp60=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162342},"main":"dist/src/index.js","gitHead":"4a9a16bbaefeb4d96d342866ac0370ca9c706e17","scripts":{"test":"jest","build":"yarn rimraf dist && tsc && yarn format-dist","format-dist":"sed -i 's/\"files\":/\"_files\":/' dist/package.json"},"typings":"dist/src/index.d.ts","_npmUser":{"name":"germartinez","email":"germaga92@gmail.com"},"repository":{"url":"git+https://github.com/safe-global/safe-apps-sdk.git","type":"git"},"_npmVersion":"9.5.1","description":"SDK developed to integrate third-party apps with Safe app.","directories":{},"_nodeVersion":"18.16.0","dependencies":{"viem":"^1.0.0","@safe-global/safe-gateway-typescript-sdk":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/safe-apps-sdk_8.0.0_1687513497824_0.8670947473236121","host":"s3://npm-registry-packages"}},"8.1.0":{"name":"@safe-global/safe-apps-sdk","version":"8.1.0","keywords":["Safe","sdk","apps"],"author":{"url":"https://safe.global","name":"Safe"},"license":"MIT","_id":"@safe-global/safe-apps-sdk@8.1.0","maintainers":[{"name":"germartinez","email":"germaga92@gmail.com"},{"name":"dasanra","email":"daniel@safe.global"}],"homepage":"https://github.com/safe-global/safe-apps-sdk#readme","bugs":{"url":"https://github.com/safe-global/safe-apps-sdk/issues"},"dist":{"shasum":"d1d0c69cd2bf4eef8a79c5d677d16971926aa64a","tarball":"https://registry.npmjs.org/@safe-global/safe-apps-sdk/-/safe-apps-sdk-8.1.0.tgz","fileCount":95,"integrity":"sha512-XJbEPuaVc7b9n23MqlF6c+ToYIS3f7P2Sel8f3cSBQ9WORE4xrSuvhMpK9fDSFqJ7by/brc+rmJR/5HViRr0/w==","signatures":[{"sig":"MEUCIQC9a5MNz9mnwnSFpF82rn170EomyIxJMXBpz9l2piL47gIgcDyORVEjIz3ZwSKZfkBwDVRggXllfEn7jibSaCQRhpU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159269},"main":"dist/src/index.js","gitHead":"a879741bf161a5fec3cc2091b461f71078ea0975","scripts":{"test":"jest","build":"yarn rimraf dist && tsc && yarn format-dist","format-dist":"sed -i '' 's/\"files\":/\"_files\":/' dist/package.json"},"typings":"dist/src/index.d.ts","_npmUser":{"name":"dasanra","email":"daniel@safe.global"},"repository":{"url":"git+https://github.com/safe-global/safe-apps-sdk.git","type":"git"},"_npmVersion":"9.6.7","description":"SDK developed to integrate third-party apps with Safe app.","directories":{},"sideEffects":false,"_nodeVersion":"18.17.0","dependencies":{"viem":"^1.0.0","@safe-global/safe-gateway-typescript-sdk":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/safe-apps-sdk_8.1.0_1691661377906_0.1519038367268859","host":"s3://npm-registry-packages"}},"9.0.0-next.0":{"name":"@safe-global/safe-apps-sdk","version":"9.0.0-next.0","keywords":["Safe","sdk","apps"],"author":{"url":"https://safe.global","name":"Safe"},"license":"MIT","_id":"@safe-global/safe-apps-sdk@9.0.0-next.0","maintainers":[{"name":"germartinez","email":"germaga92@gmail.com"},{"name":"dasanra","email":"daniel@safe.global"}],"homepage":"https://github.com/safe-global/safe-apps-sdk#readme","bugs":{"url":"https://github.com/safe-global/safe-apps-sdk/issues"},"dist":{"shasum":"a9fa2d9aa211675435d7d848dfd65a5983d68138","tarball":"https://registry.npmjs.org/@safe-global/safe-apps-sdk/-/safe-apps-sdk-9.0.0-next.0.tgz","fileCount":200,"integrity":"sha512-PeTIkAKGLB5jZ0mlsvNhpt6Ryz+XM9A2sdrqt3DlsOHe0/sN1vTO8nQ5hpulaNDBBbDkpVNjdBzEmkep1Xn/nA==","signatures":[{"sig":"MEUCIQCTH46l4f5DgezRwnDdxag5/BpTdzmG2Lja2T52jmvQgQIgaMtyKQ453H+yiI2dpenaL4AX0+v+k4N6PgC9vQ/7JKI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":247078},"main":"dist/cjs/index.js","type":"module","types":"dist/types/index.d.ts","module":"dist/esm/index.js","readme":"# Safe Apps SDK\n\n[![npm](https://img.shields.io/npm/v/@safe-global/safe-apps-sdk)](https://www.npmjs.com/package/@safe-global/safe-apps-sdk)\n\nSoftware development kit to integrate third-party applications (Safe Apps) with Safe (https://app.safe.global/).\n\n## Install\n\n### Install the package with yarn or npm:\n\n```bash\nyarn add @safe-global/safe-apps-sdk\n\nnpm install @safe-global/safe-apps-sdk\n```\n\n## Build\n\n```bash\nyarn install\nyarn build\n\nnpm install\nnpm build\n```\n\nThere are differences in arguments for `sed` unix utility on MacOS and Linux:\nFor MacOS it should be:\n\n```\n  \"format-dist\": \"sed -i '' 's/\\\"files\\\":/\\\"_files\\\":/' dist/package.json\"\n```\n\nAnd for Linux:\n\n```\n  \"format-dist\": \"sed -i 's/\\\"files\\\":/\\\"_files\\\":/' dist/package.json\",\n```\n\n## Documentation\n\nApps built with the Safe Apps SDK are meant to be run in an iframe inside the Safe Web UI.\nThis library exposes a class as a default export. It accepts an optional options object:  \n`allowedDomains` - Array of regular expressions for origins to accept messages from. If not passed, accepts\nmessages from all domains  \n`debug` - Boolean. If enabled, it will log outgoing/incoming messages.\n\n```ts\nimport SafeAppsSDK from '@safe-global/safe-apps-sdk';\n\ntype Opts = {\n  allowedDomains?: RegExp[];\n  debug?: boolean;\n};\n\nconst opts: Opts = {\n  allowedDomains: [/gnosis-safe.io$/, /app.safe.global$/],\n  debug: false,\n};\n\nconst appsSdk = new SafeAppsSDK(opts);\n```\n\nThe instance allows you to interact with the Safe application.\n\n## Safe\n\n### Getting Safe information\n\nSafe information can be obtained by calling `.safe.getInfo()`\n\n```js\nconst safe = await appsSdk.safe.getInfo();\n// {\n//   \"safeAddress\": \"0x2fC97b3c7324EFc0BeC094bf75d5dCdFEb082C53\",\n//   \"chainId\": 4\n// }\n```\n\n### Getting Chain information\n\nChain information can be obtained by calling `.safe.getChainInfo()`\n\n```js\nconst chain = await appsSdk.safe.getChainInfo();\n// {\n//   chainName: \"Rinkeby\",\n//   chainId: \"4\",\n//   shortName: \"rin\",\n//   nativeCurrency: {\n//     name: \"Ether\",\n//     symbol: \"ETH\",\n//     decimals: 18,\n//     logoUri:\n//       \"https://safe-transaction-assets.gnosis-safe.io/chains/4/currency_logo.png\",\n//   },\n//   blockExplorerUriTemplate: {\n//     address: \"https://rinkeby.etherscan.io/address/{{address}}\",\n//     txHash: \"https://rinkeby.etherscan.io/tx/{{txHash}}\",\n//     api: \"https://api-rinkeby.etherscan.io/api?module={{module}}&action={{action}}&address={{address}}&apiKey={{apiKey}}\",\n//   },\n// }\n```\n\n### Getting Safe Balances\n\nSafe Balances can be obtained by calling `.safe.experimental_getBalances()`. This method is experimental and may be changed to return paginated results.\n\nIt accepts an optional object argument with `currency` property.\n`currency` - [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code as string\n\n```js\nconst safe = await appsSdk.safe.experimental_getBalances({ currency: 'rub' });\n// {\n//   \"fiatTotal\": \"0\",\n//   \"items\": [\n//     {\n//     \"tokenInfo\": {\n//       \"type\": \"ETHER\",\n//       \"address\": \"0x0000000000000000000000000000000000000000\",\n//       \"decimals\": 18,\n//       \"symbol\": \"ETH\",\n//       \"name\": \"Ether\",\n//       \"logoUri\": null\n//     },\n//     \"balance\": \"0\",\n//     \"fiatBalance\": \"0\",\n//     \"fiatConversion\": \"222297.29\"\n//     }\n//   ]\n// }\n```\n\nFor detailed returned data types, please check our [type declaration file](/packages/safe-apps-sdk/src/types.ts#L203-L227)\n\n### Sending TXs\n\nSending a TX through the Safe is as simple as invoking `.txs.send()`\n\n```js\n// Create a web3 instance\nconst web3 = new Web3('https://goerli.infura.io/v3/{YOUR_API_KEY}');\nconst contract = new web3.eth.Contract(abi, contractAddress);\n\nconst txs = [\n  {\n    to: someAddress,\n    value: 0,\n    data: contract.methods.someMethod().encodeABI(),\n  },\n  {\n    to: someAddress2,\n    value: 0,\n    data: contract.methods.someOtherMethod().encodeABI(),\n  },\n];\n\nconst params = {\n  safeTxGas: 500000,\n};\n\ntry {\n  const txs = await appsSdk.txs.send({ txs, params });\n  // { safeTxHash: '0x...' }\n} catch (err) {\n  console.error(err.message);\n}\n```\n\n> Note: `value` accepts a number or a string as a decimal or hex number.\n\n### Signing messages\n\n#### Off-chain signing\n\nSigning a message off-chain first requires dispatching a `safe_setSettings` RPC call (via `sdk.eth.setSafeSettings()`) with the `offChainSigning` flag set to `true`. Then the relevant `signMessage`/`signTypedData` needs to be called, proposing a message to our services that can then be approved by Safe owners.\n\n```js\nconst settings = {\n  offChainSigning: true,\n};\n\nconst currentSettings = await appsSdk.eth.setSafeSettings([settings]);\n\nconst message = \"I'm the owner of wallet 0x000000\";\nconst hash = await sdk.txs.signMessage(message);\n// { messageHash: '0x...' }\n\nconst typedMessage = {\n    ...\n}\nconst hash = await sdk.txs.signTypedMessage(typedMessage);\n// { messageHash: '0x...' }\n```\n\nSigning returns the `messageHash` of the proposed [`SafeMessage`](https://github.com/safe-global/safe-contracts/blob/main/contracts/handler/CompatibilityFallbackHandler.sol#L12) which can be used to fetch the off-chain signature with.\n\n```js\nconst offChainSignature = await sdk.safe.getOffChainSignature(messageHash);\n// '0x123'\n```\n\nThe returned signature will either be an empty string or valid one once the required number of Safe owners have confirmed the message.\n\nTo validate the signature, use `sdk.safe.isMessageSigned()`, passing the signature as the second argument.\n\n```js\nconst message = \"I'm the owner of wallet 0x000000\";\nconst messageIsSigned = await sdk.safe.isMessageSigned(message, signature);\n```\n\n#### On-chain signing\n\nBecause the Safe is a smart contract wallet, it doesn't have a private key that the wallet can use to sign messages. Instead, we have a library to sign messages, and the validation logic follows [EIP-1271 - Standard Signature Validation Method for Contracts](https://eips.ethereum.org/EIPS/eip-1271). Signing a message with the Safe requires sending a Safe transaction that needs to be approved by Safe owners. To dive into the smart contract implementation, you can start with [library tests](https://github.com/safe-global/safe-contracts/blob/ee92957307653ae6cf7312bbcb1a13c6884ea6ea/test/libraries/SignMessageLib.spec.ts) in the safe-contracts repo.\n\nTo trigger the transaction to sign a message, you can use `sdk.txs.signMessage()` or `sdk.txs.signTypedMessage()`.\n\n```js\nconst message = \"I'm the owner of wallet 0x000000\";\nconst tx = await sdk.txs.signMessage(message);\n// { safeTxHash: '0x...' }\n\nconst typedMessage = {\n    ...\n}\nconst typedTx = await sdk.txs.signTypedMessage(typedMessage);\n// { safeTxHash: '0x...' }\n```\n\nThe non-typed message will be hashed using [EIP-191](https://eips.ethereum.org/EIPS/eip-191). To calculate the hash, you can use `sdk.safe.calculateMessageHash()`.  \nIn case of a typed message, it will be hashed according to [EIP-712](https://eips.ethereum.org/EIPS/eip-712) standard. To calculate message hash, you can use `sdk.safe.calculateTypedMessageHash()`:\n\n```js\nconst messageHash = sdk.safe.calculateMessageHash(message);\n\nconst typedMessageHash = sdk.safe.calculateTypedMessageHash(typedMessage);\n```\n\nTo validate if the message is signed, use `sdk.safe.isMessageSigned()`\n\n```js\nconst message = \"I'm the owner of wallet 0x000000\";\nconst messageIsSigned = await sdk.safe.isMessageSigned(message);\n```\n\n### Retrieving transaction's status\n\nOnce you received safe transaction hash, you might want to get the status of the transaction (was it executed? how many confirmations does it have?):\n\n```js\nconst tx = await sdk.txs.getBySafeTxHash(safeTxHash);\n```\n\nIt will return a [GatewayTransactionDetails](src/types/gateway.ts#L222-L230) structure or throw an error if the backend hasn't synced the transaction yet\n\n### Requesting the Address Book\n\nThe Address Book can be obtained by calling `.safe.requestAddressBook()`. This method is restricted so it needs to be approved by the current connected Safe owner if the caller doesn't have granted permissions.\n\nAll the flow for making the request is handled by the SDK so developers only need to use this method and the rest will be handled by the SDK and the Web UI.\n\n```js\nconst addressBook = await appsSdk.safe.requestAddressBook();\n// [\n//   {\n//     address: '0x0',\n//     chainId: '4',\n//     name: 'Entry 1',\n//   },\n//   {\n//     address: '0x1',\n//     chainId: '4',\n//     name: 'Entry 2',\n//   },\n// ];\n```\n\nReturns an array of [AddressBookItem](src/types/sdk.ts#L55-L59)\n\n### Managing permissions\n\nUsually you are not going to use these methods because restricted methods as `requestAddressBook` handle all the logic for you.\n\nHowever as part of the internal implementation for the [EIP-2255](https://eips.ethereum.org/EIPS/eip-2255) you now have accessible 2 more methods under the `wallet` section in the SDK.\n\n**Get permissions**\n\n```js\nawait appsSdk.wallet.getPermissions();\n// [\n//   {\n//     parentCapability: \"requestAddressBook\",\n//     invoker: \"https://invoker-dapp.eth\",\n//     date: 1658499292741,\n//     caveats: [],\n//   }\n// ]\n```\n\nReturns an array of [permissions](src/types/permissions.ts#L1-L6) granted to the dapp.\n\n**Request Permissions**\n\nFor requesting permissions you should call the `requestPermissions` method that accepts a parameter with an array of [requested permissions](src/types/permissions.ts#L8-L10).\n\n```js\nawait appsSdk.wallet.requestPermissions([{ requestAddressBook: {} }]);\n// [\n//   {\n//     parentCapability: \"requestAddressBook\",\n//     invoker: \"https://invoker-dapp.eth\",\n//     date: 1658499292741,\n//     caveats: [],\n//   }\n// ]\n```\n\nReturns an array of [permissions](src/types/permissions.ts#L1-L6) granted to the dapp. If the permissions are not currently granted then the user will be prompted from the Web UI (only first time) about granting the corresponding permissions.\n\n## RPC Calls\n\nThe SDK exposes some of Ethereum's [JSON-RPC API](https://eth.wiki/json-rpc/API), namely the read methods.\n\n### The default block parameter\n\nThe following methods have an extra default block parameter:\n\n- getBalance\n- getCode\n- getStorageAt\n- call\n\nWhen requests are made that act on the state of ethereum, the last default block parameter determines the height of the block.\n\nThe following options are possible for the defaultBlock parameter:\n\n`HEX String` - an integer block number  \n`String \"earliest\"` for the earliest/genesis block  \n`String \"latest\"` - for the latest mined block (default)  \n`String \"pending\"` - for the pending state/transactions\n\n### getBalance\n\nReturns the balance of the account of given address.\n\n```js\nconst balance = await appsSdk.eth.getBalance(['0x...']);\n```\n\n### getCode\n\nReturns code at a given address.\n\n```js\nconst code = await appsSdk.eth.getCode(['0x...']);\n```\n\n### getStorageAt\n\nReturns the value from a storage position at a given address.\n\n```js\nconst value = await appsSdk.eth.getStorageAt(['0x...', 0]);\n```\n\n### call\n\nExecutes a new message call immediately without creating a transaction on the block chain.\n\n```js\nconst config = {\n  from: '0x0000000000000000000000000000000000000000',\n  to: '0x0000000000000000000000000000000000000000',\n};\n\nconst result = await appsSdk.eth.call([config]);\n```\n\nThe transaction call object:  \n`from` - (optional) The address the transaction is sent from.  \n`to` 20 Bytes - The address the transaction is directed to.  \n`gas` - (optional) Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.  \n`gasPrice` - (optional) Integer of the gasPrice used for each paid gas  \n`value` - (optional) Integer of the value sent with this transaction  \n`data` - (optional) Hash of the method signature and encoded parameters. For details see [Ethereum Contract ABI in the Solidity documentation](https://docs.soliditylang.org/en/latest/abi-spec.html)\n\n### getPastLogs\n\nReturns an array of all logs matching a given filter object.\n\n```js\nconst params = [\n  {\n    fromBlock: 11054275,\n    toBlock: 'latest',\n  },\n];\n\nconst logs = await appsSdk.eth.getPastLogs([params]);\n```\n\nThe filter options:  \n`fromBlock` - Integer block number, or \"latest\" for the last mined block or \"pending\", \"earliest\" for not yet mined transactions.  \n`toBlock` - Integer block number, or \"latest\" for the last mined block or \"pending\", \"earliest\" for not yet mined transactions.  \n`address` - (optional) Contract address or a list of addresses from which logs should originate.  \n`topics` - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with “or” options.\n\n### getBlockByHash\n\nReturns information about a block by hash.\n\n```js\nconst hash = '0x1955a9f306903669e295196752b11bc0dee33b48cabdf44b1103b7cea086cae7';\n\nconst block = await appsSdk.eth.getBlockByHash([hash, true]);\n```\n\nParameters  \n`DATA` - Hash of a block.  \n`Boolean` (default: false) - If true it returns the full transaction objects, if false only the hashes of the transactions.\n\n### getBlockByNumber\n\nReturns information about a block by block number.\n\n```js\nconst number = 11054275;\n\nconst block = await appsSdk.eth.getBlockByNumber([number]);\n```\n\nParameters  \n`QUANTITY|TAG` - integer of a block number, or the string \"earliest\", \"latest\" or \"pending\", as in the default block parameter.\n`Boolean` (default: false) - If true it returns the full transaction objects, if false only the hashes of the transactions.\n\n### getTransactionByHash\n\nReturns the information about a transaction requested by transaction hash.\n\n```js\nconst tx = await appsSdk.eth.getTransactionByHash([\n  '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b',\n]);\n```\n\n### getTransactionReceipt\n\nReturns the receipt of a transaction by transaction hash.\n\n> Note: That the receipt is not available for pending transactions.\n\n```js\nconst tx = await appsSdk.eth.getTransactionReceipt([\n  '0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238',\n]);\n```\n\n### setSafeSettings\n\nSets settings of the currently opened Safe.\n\n> Note: Returns the new `SafeSettings`.\n\n```js\nconst settings = {\n  offChainSigning: true,\n};\n\nconst success = await appsSdk.eth.setSafeSettings([settings]);\n```\n\n## Testing in the Safe application\n\n### Manifest\n\nIt is mandatory that your app exposes a `manifest.json` file in the root dir with this structure:\n\n```json\n{\n  \"name\": \"YourAppName\",\n  \"description\": \"A description of what your app do\",\n  \"icons\": [\n    {\n      \"src\": \"/myAppIcon.svg\",\n      \"type\": \"image/svg+xml\",\n      \"sizes\": \"any\"\n    }\n  ]\n}\n```\n\n> Note: icons[n].src it's the public relative path where the Safe will try to load your app icon. For this example, it should be https://yourAppUrl/myAppIcon.svg.\n\nWe are following the [Manifest spec](https://developer.mozilla.org/en-US/docs/Web/Manifest) so you can find more info about how to fill the `icons` field there.\n\n### CORS\n\nAs the Safe app is included into the Safe application via an iframe it is required to enable **Cross Site Requests** by setting the **CORS** headers when serving the Safe app.\n\nThe required headers are:\n\n```\n\"Access-Control-Allow-Origin\": \"\\*\",\n\"Access-Control-Allow-Methods\": \"GET\",\n\"Access-Control-Allow-Headers\": \"X-Requested-With, content-type, Authorization\"\n```\n\n### React development\n\nIt is possible to use the local React development server. For this you need to set the **CORS** headers and make sure to use the same protocol (http or https) as the Safe interface.\n\n#### CORS\n\nFor this we recommend to use [react-app-rewired](https://www.npmjs.com/package/react-app-rewired). To enable the library update the `scripts` section in the `package.json`:\n\n```json\n\"scripts\": {\n  \"start\": \"react-app-rewired start\",\n  \"build\": \"react-app-rewired build\",\n  \"test\": \"react-app-rewired test\"\n},\n```\n\nAdditionally, you need to create the `config-overrides.js` file in the root of the project to confirgure the **CORS** headers. The content of the file should be:\n\n```js\n/* config-overrides.js */\n\nmodule.exports = {\n  // The function to use to create a webpack dev server configuration when running the development\n  // server with 'npm run start' or 'yarn start'.\n  // Example: set the dev server to use a specific certificate in https.\n  devServer: function (configFunction) {\n    // Return the replacement function for create-react-app to use to generate the Webpack\n    // Development Server config. \"configFunction\" is the function that would normally have\n    // been used to generate the Webpack Development server config - you can use it to create\n    // a starting configuration to then modify instead of having to create a config from scratch.\n    return function (proxy, allowedHost) {\n      // Create the default config by calling configFunction with the proxy/allowedHost parameters\n      const config = configFunction(proxy, allowedHost);\n\n      config.headers = {\n        'Access-Control-Allow-Origin': '*',\n        'Access-Control-Allow-Methods': 'GET',\n        'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',\n      };\n\n      // Return your customised Webpack Development Server config.\n      return config;\n    };\n  },\n};\n```\n\n#### SSL\n\nTo enable SSL with `react-scripts` it is necessary to set the `HTTPS` environment variable to `true`. This can be done in the `package.json` file by adjusting the `scripts` section to:\n\n```json\n\n\"scripts\": {\n  \"start\": \"HTTPS=true react-app-rewired start\",\n},\n```\n\nAs in most cases the SSL certificate provided by `react-scripts` is not valid it is required to mark it as trusted in your browser. For this open the Safe App in a separate tab (not in the Safe interface) and accept the certificate/ ignore the warning.\n\n### Loading the Safe App\n\nWhile developing your Safe App you can directly use [our production interface](https://app.safe.global) for testing it. Some testnets like Goerli are also available there.\nOnce your app is live, even if you are running it locally, you can import it to the Safe application as a custom app. To do so, you should select the \"Apps\" tab:\n\n![Apps section button][safeappstab]\n\n[safeappstab]: https://raw.githubusercontent.com/safe-global/safe-apps-sdk/main/assets/safe-tab-apps.png 'Safe: Apps tab'\n\nUse the `Add custom app` button and add your app using a link:\n\n![Add custom Safe App form][safeaddapp]\n\n[safeaddapp]: https://raw.githubusercontent.com/safe-global/safe-apps-sdk/main/assets/third-party-app-modal.png 'Safe: Add Safe App'\n\n## Deploy to IPFS\n\nThis requires that you have `ipfs` installed ([Instructions](https://gist.github.com/MiguelBel/b3b5f711aa8d9362afa5f16e4e972461))\n\n```bash\nyarn build\nipfs add -r build\n```\n\n## Examples of applications built with this SDK\n\n- https://github.com/safe-global/safe-react-apps\n- https://github.com/Uxio0/safe-react-collectibles\n- https://docs.safe.global/safe-core-aa-sdk/safe-apps#existing-safe-apps\n\n## License\n\nThis library is released under MIT.\n\n## Contributors\n\n- Nicolás Domínguez ([nicosampler](https://github.com/nicosampler))\n- Richard Meissner ([rmeissner](https://github.com/rmeissner))\n","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","default":"./dist/cjs/index.js"}},"gitHead":"f80015c79ec00ad2d686933a01a99f54375dc0a0","scripts":{"test":"jest","build":"yarn rimraf ./dist && yarn build:cjs && yarn build:esm && yarn build:types","prebuild":"node -p \"'export const getSDKVersion = () => \\'' + require('./package.json').version.split('-')[0] + '\\';'\" > src/version.ts","build:cjs":"tsc --project tsconfig.json --module commonjs --outDir ./dist/cjs && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json","build:esm":"tsc --project tsconfig.json --module es2020 --outDir ./dist/esm && echo '{\"type\": \"module\"}' > ./dist/esm/package.json","build:types":"tsc --project tsconfig.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap"},"_npmUser":{"name":"dasanra","email":"daniel@safe.global"},"repository":{"url":"git+https://github.com/safe-global/safe-apps-sdk.git","type":"git"},"_npmVersion":"9.6.7","description":"SDK developed to integrate third-party apps with Safe app.","directories":{},"sideEffects":false,"_nodeVersion":"18.17.0","dependencies":{"viem":"^1.6.0","@safe-global/safe-gateway-typescript-sdk":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/safe-apps-sdk_9.0.0-next.0_1692972265121_0.7802822692289799","host":"s3://npm-registry-packages"}},"9.0.0-next.1":{"name":"@safe-global/safe-apps-sdk","version":"9.0.0-next.1","keywords":["Safe","sdk","apps"],"author":{"url":"https://safe.global","name":"Safe"},"license":"MIT","_id":"@safe-global/safe-apps-sdk@9.0.0-next.1","maintainers":[{"name":"germartinez","email":"germaga92@gmail.com"},{"name":"dasanra","email":"daniel@safe.global"}],"homepage":"https://github.com/safe-global/safe-apps-sdk#readme","bugs":{"url":"https://github.com/safe-global/safe-apps-sdk/issues"},"dist":{"shasum":"762186e36a3580c93e7efe7f49259c75043c5b7b","tarball":"https://registry.npmjs.org/@safe-global/safe-apps-sdk/-/safe-apps-sdk-9.0.0-next.1.tgz","fileCount":200,"integrity":"sha512-0XsgPXCOXx0wKhumKX/b65alRgd3umfNhsCq/S0K/hhMD/Uh6BTOzHRNFCosbnGvWQT75Hp3Y11LVS7ZD49t/w==","signatures":[{"sig":"MEQCIAErSyiRpyAb+Uw9P7j3PUcdP4L2ad+HkdP/dQ9ppbfTAiA1lFEnNCLhDCvt4QQ6PtmQdvBO1dIdwJhSJP06IqfwFw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":247557},"main":"dist/cjs/index.js","type":"module","types":"dist/types/index.d.ts","module":"dist/esm/index.js","readme":"# Safe Apps SDK\n\n[![npm](https://img.shields.io/npm/v/@safe-global/safe-apps-sdk)](https://www.npmjs.com/package/@safe-global/safe-apps-sdk)\n\nSoftware development kit to integrate third-party applications (Safe Apps) with Safe (https://app.safe.global/).\n\n## Install\n\n### Install the package with yarn or npm:\n\n```bash\nyarn add @safe-global/safe-apps-sdk\n\nnpm install @safe-global/safe-apps-sdk\n```\n\n## Build\n\n```bash\nyarn install\nyarn build\n\nnpm install\nnpm build\n```\n\nThere are differences in arguments for `sed` unix utility on MacOS and Linux:\nFor MacOS it should be:\n\n```\n  \"format-dist\": \"sed -i '' 's/\\\"files\\\":/\\\"_files\\\":/' dist/package.json\"\n```\n\nAnd for Linux:\n\n```\n  \"format-dist\": \"sed -i 's/\\\"files\\\":/\\\"_files\\\":/' dist/package.json\",\n```\n\n## Documentation\n\nApps built with the Safe Apps SDK are meant to be run in an iframe inside the Safe Web UI.\nThis library exposes a class as a default export. It accepts an optional options object:  \n`allowedDomains` - Array of regular expressions for origins to accept messages from. If not passed, accepts\nmessages from all domains  \n`debug` - Boolean. If enabled, it will log outgoing/incoming messages.\n\n```ts\nimport SafeAppsSDK from '@safe-global/safe-apps-sdk';\n\ntype Opts = {\n  allowedDomains?: RegExp[];\n  debug?: boolean;\n};\n\nconst opts: Opts = {\n  allowedDomains: [/gnosis-safe.io$/, /app.safe.global$/],\n  debug: false,\n};\n\nconst appsSdk = new SafeAppsSDK(opts);\n```\n\nThe instance allows you to interact with the Safe application.\n\n## Safe\n\n### Getting Safe information\n\nSafe information can be obtained by calling `.safe.getInfo()`\n\n```js\nconst safe = await appsSdk.safe.getInfo();\n// {\n//   \"safeAddress\": \"0x2fC97b3c7324EFc0BeC094bf75d5dCdFEb082C53\",\n//   \"chainId\": 4\n// }\n```\n\n### Getting Chain information\n\nChain information can be obtained by calling `.safe.getChainInfo()`\n\n```js\nconst chain = await appsSdk.safe.getChainInfo();\n// {\n//   chainName: \"Rinkeby\",\n//   chainId: \"4\",\n//   shortName: \"rin\",\n//   nativeCurrency: {\n//     name: \"Ether\",\n//     symbol: \"ETH\",\n//     decimals: 18,\n//     logoUri:\n//       \"https://safe-transaction-assets.gnosis-safe.io/chains/4/currency_logo.png\",\n//   },\n//   blockExplorerUriTemplate: {\n//     address: \"https://rinkeby.etherscan.io/address/{{address}}\",\n//     txHash: \"https://rinkeby.etherscan.io/tx/{{txHash}}\",\n//     api: \"https://api-rinkeby.etherscan.io/api?module={{module}}&action={{action}}&address={{address}}&apiKey={{apiKey}}\",\n//   },\n// }\n```\n\n### Getting Safe Balances\n\nSafe Balances can be obtained by calling `.safe.experimental_getBalances()`. This method is experimental and may be changed to return paginated results.\n\nIt accepts an optional object argument with `currency` property.\n`currency` - [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code as string\n\n```js\nconst safe = await appsSdk.safe.experimental_getBalances({ currency: 'rub' });\n// {\n//   \"fiatTotal\": \"0\",\n//   \"items\": [\n//     {\n//     \"tokenInfo\": {\n//       \"type\": \"ETHER\",\n//       \"address\": \"0x0000000000000000000000000000000000000000\",\n//       \"decimals\": 18,\n//       \"symbol\": \"ETH\",\n//       \"name\": \"Ether\",\n//       \"logoUri\": null\n//     },\n//     \"balance\": \"0\",\n//     \"fiatBalance\": \"0\",\n//     \"fiatConversion\": \"222297.29\"\n//     }\n//   ]\n// }\n```\n\nFor detailed returned data types, please check our [type declaration file](/packages/safe-apps-sdk/src/types.ts#L203-L227)\n\n### Sending TXs\n\nSending a TX through the Safe is as simple as invoking `.txs.send()`\n\n```js\n// Create a web3 instance\nconst web3 = new Web3('https://goerli.infura.io/v3/{YOUR_API_KEY}');\nconst contract = new web3.eth.Contract(abi, contractAddress);\n\nconst txs = [\n  {\n    to: someAddress,\n    value: 0,\n    data: contract.methods.someMethod().encodeABI(),\n  },\n  {\n    to: someAddress2,\n    value: 0,\n    data: contract.methods.someOtherMethod().encodeABI(),\n  },\n];\n\nconst params = {\n  safeTxGas: 500000,\n};\n\ntry {\n  const txs = await appsSdk.txs.send({ txs, params });\n  // { safeTxHash: '0x...' }\n} catch (err) {\n  console.error(err.message);\n}\n```\n\n> Note: `value` accepts a number or a string as a decimal or hex number.\n\n### Signing messages\n\n#### Off-chain signing\n\nSigning a message off-chain first requires dispatching a `safe_setSettings` RPC call (via `sdk.eth.setSafeSettings()`) with the `offChainSigning` flag set to `true`. Then the relevant `signMessage`/`signTypedData` needs to be called, proposing a message to our services that can then be approved by Safe owners.\n\n```js\nconst settings = {\n  offChainSigning: true,\n};\n\nconst currentSettings = await appsSdk.eth.setSafeSettings([settings]);\n\nconst message = \"I'm the owner of wallet 0x000000\";\nconst hash = await sdk.txs.signMessage(message);\n// { messageHash: '0x...' }\n\nconst typedMessage = {\n    ...\n}\nconst hash = await sdk.txs.signTypedMessage(typedMessage);\n// { messageHash: '0x...' }\n```\n\nSigning returns the `messageHash` of the proposed [`SafeMessage`](https://github.com/safe-global/safe-contracts/blob/main/contracts/handler/CompatibilityFallbackHandler.sol#L12) which can be used to fetch the off-chain signature with.\n\n```js\nconst offChainSignature = await sdk.safe.getOffChainSignature(messageHash);\n// '0x123'\n```\n\nThe returned signature will either be an empty string or valid one once the required number of Safe owners have confirmed the message.\n\nTo validate the signature, use `sdk.safe.isMessageSigned()`, passing the signature as the second argument.\n\n```js\nconst message = \"I'm the owner of wallet 0x000000\";\nconst messageIsSigned = await sdk.safe.isMessageSigned(message, signature);\n```\n\n#### On-chain signing\n\nBecause the Safe is a smart contract wallet, it doesn't have a private key that the wallet can use to sign messages. Instead, we have a library to sign messages, and the validation logic follows [EIP-1271 - Standard Signature Validation Method for Contracts](https://eips.ethereum.org/EIPS/eip-1271). Signing a message with the Safe requires sending a Safe transaction that needs to be approved by Safe owners. To dive into the smart contract implementation, you can start with [library tests](https://github.com/safe-global/safe-contracts/blob/ee92957307653ae6cf7312bbcb1a13c6884ea6ea/test/libraries/SignMessageLib.spec.ts) in the safe-contracts repo.\n\nTo trigger the transaction to sign a message, you can use `sdk.txs.signMessage()` or `sdk.txs.signTypedMessage()`.\n\n```js\nconst message = \"I'm the owner of wallet 0x000000\";\nconst tx = await sdk.txs.signMessage(message);\n// { safeTxHash: '0x...' }\n\nconst typedMessage = {\n    ...\n}\nconst typedTx = await sdk.txs.signTypedMessage(typedMessage);\n// { safeTxHash: '0x...' }\n```\n\nThe non-typed message will be hashed using [EIP-191](https://eips.ethereum.org/EIPS/eip-191). To calculate the hash, you can use `sdk.safe.calculateMessageHash()`.  \nIn case of a typed message, it will be hashed according to [EIP-712](https://eips.ethereum.org/EIPS/eip-712) standard. To calculate message hash, you can use `sdk.safe.calculateTypedMessageHash()`:\n\n```js\nconst messageHash = sdk.safe.calculateMessageHash(message);\n\nconst typedMessageHash = sdk.safe.calculateTypedMessageHash(typedMessage);\n```\n\nTo validate if the message is signed, use `sdk.safe.isMessageSigned()`\n\n```js\nconst message = \"I'm the owner of wallet 0x000000\";\nconst messageIsSigned = await sdk.safe.isMessageSigned(message);\n```\n\n### Retrieving transaction's status\n\nOnce you received safe transaction hash, you might want to get the status of the transaction (was it executed? how many confirmations does it have?):\n\n```js\nconst tx = await sdk.txs.getBySafeTxHash(safeTxHash);\n```\n\nIt will return a [GatewayTransactionDetails](src/types/gateway.ts#L222-L230) structure or throw an error if the backend hasn't synced the transaction yet\n\n### Requesting the Address Book\n\nThe Address Book can be obtained by calling `.safe.requestAddressBook()`. This method is restricted so it needs to be approved by the current connected Safe owner if the caller doesn't have granted permissions.\n\nAll the flow for making the request is handled by the SDK so developers only need to use this method and the rest will be handled by the SDK and the Web UI.\n\n```js\nconst addressBook = await appsSdk.safe.requestAddressBook();\n// [\n//   {\n//     address: '0x0',\n//     chainId: '4',\n//     name: 'Entry 1',\n//   },\n//   {\n//     address: '0x1',\n//     chainId: '4',\n//     name: 'Entry 2',\n//   },\n// ];\n```\n\nReturns an array of [AddressBookItem](src/types/sdk.ts#L55-L59)\n\n### Managing permissions\n\nUsually you are not going to use these methods because restricted methods as `requestAddressBook` handle all the logic for you.\n\nHowever as part of the internal implementation for the [EIP-2255](https://eips.ethereum.org/EIPS/eip-2255) you now have accessible 2 more methods under the `wallet` section in the SDK.\n\n**Get permissions**\n\n```js\nawait appsSdk.wallet.getPermissions();\n// [\n//   {\n//     parentCapability: \"requestAddressBook\",\n//     invoker: \"https://invoker-dapp.eth\",\n//     date: 1658499292741,\n//     caveats: [],\n//   }\n// ]\n```\n\nReturns an array of [permissions](src/types/permissions.ts#L1-L6) granted to the dapp.\n\n**Request Permissions**\n\nFor requesting permissions you should call the `requestPermissions` method that accepts a parameter with an array of [requested permissions](src/types/permissions.ts#L8-L10).\n\n```js\nawait appsSdk.wallet.requestPermissions([{ requestAddressBook: {} }]);\n// [\n//   {\n//     parentCapability: \"requestAddressBook\",\n//     invoker: \"https://invoker-dapp.eth\",\n//     date: 1658499292741,\n//     caveats: [],\n//   }\n// ]\n```\n\nReturns an array of [permissions](src/types/permissions.ts#L1-L6) granted to the dapp. If the permissions are not currently granted then the user will be prompted from the Web UI (only first time) about granting the corresponding permissions.\n\n## RPC Calls\n\nThe SDK exposes some of Ethereum's [JSON-RPC API](https://eth.wiki/json-rpc/API), namely the read methods.\n\n### The default block parameter\n\nThe following methods have an extra default block parameter:\n\n- getBalance\n- getCode\n- getStorageAt\n- call\n\nWhen requests are made that act on the state of ethereum, the last default block parameter determines the height of the block.\n\nThe following options are possible for the defaultBlock parameter:\n\n`HEX String` - an integer block number  \n`String \"earliest\"` for the earliest/genesis block  \n`String \"latest\"` - for the latest mined block (default)  \n`String \"pending\"` - for the pending state/transactions\n\n### getBalance\n\nReturns the balance of the account of given address.\n\n```js\nconst balance = await appsSdk.eth.getBalance(['0x...']);\n```\n\n### getCode\n\nReturns code at a given address.\n\n```js\nconst code = await appsSdk.eth.getCode(['0x...']);\n```\n\n### getStorageAt\n\nReturns the value from a storage position at a given address.\n\n```js\nconst value = await appsSdk.eth.getStorageAt(['0x...', 0]);\n```\n\n### call\n\nExecutes a new message call immediately without creating a transaction on the block chain.\n\n```js\nconst config = {\n  from: '0x0000000000000000000000000000000000000000',\n  to: '0x0000000000000000000000000000000000000000',\n};\n\nconst result = await appsSdk.eth.call([config]);\n```\n\nThe transaction call object:  \n`from` - (optional) The address the transaction is sent from.  \n`to` 20 Bytes - The address the transaction is directed to.  \n`gas` - (optional) Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.  \n`gasPrice` - (optional) Integer of the gasPrice used for each paid gas  \n`value` - (optional) Integer of the value sent with this transaction  \n`data` - (optional) Hash of the method signature and encoded parameters. For details see [Ethereum Contract ABI in the Solidity documentation](https://docs.soliditylang.org/en/latest/abi-spec.html)\n\n### getPastLogs\n\nReturns an array of all logs matching a given filter object.\n\n```js\nconst params = [\n  {\n    fromBlock: 11054275,\n    toBlock: 'latest',\n  },\n];\n\nconst logs = await appsSdk.eth.getPastLogs([params]);\n```\n\nThe filter options:  \n`fromBlock` - Integer block number, or \"latest\" for the last mined block or \"pending\", \"earliest\" for not yet mined transactions.  \n`toBlock` - Integer block number, or \"latest\" for the last mined block or \"pending\", \"earliest\" for not yet mined transactions.  \n`address` - (optional) Contract address or a list of addresses from which logs should originate.  \n`topics` - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with “or” options.\n\n### getBlockByHash\n\nReturns information about a block by hash.\n\n```js\nconst hash = '0x1955a9f306903669e295196752b11bc0dee33b48cabdf44b1103b7cea086cae7';\n\nconst block = await appsSdk.eth.getBlockByHash([hash, true]);\n```\n\nParameters  \n`DATA` - Hash of a block.  \n`Boolean` (default: false) - If true it returns the full transaction objects, if false only the hashes of the transactions.\n\n### getBlockByNumber\n\nReturns information about a block by block number.\n\n```js\nconst number = 11054275;\n\nconst block = await appsSdk.eth.getBlockByNumber([number]);\n```\n\nParameters  \n`QUANTITY|TAG` - integer of a block number, or the string \"earliest\", \"latest\" or \"pending\", as in the default block parameter.\n`Boolean` (default: false) - If true it returns the full transaction objects, if false only the hashes of the transactions.\n\n### getTransactionByHash\n\nReturns the information about a transaction requested by transaction hash.\n\n```js\nconst tx = await appsSdk.eth.getTransactionByHash([\n  '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b',\n]);\n```\n\n### getTransactionReceipt\n\nReturns the receipt of a transaction by transaction hash.\n\n> Note: That the receipt is not available for pending transactions.\n\n```js\nconst tx = await appsSdk.eth.getTransactionReceipt([\n  '0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238',\n]);\n```\n\n### setSafeSettings\n\nSets settings of the currently opened Safe.\n\n> Note: Returns the new `SafeSettings`.\n\n```js\nconst settings = {\n  offChainSigning: true,\n};\n\nconst success = await appsSdk.eth.setSafeSettings([settings]);\n```\n\n## Testing in the Safe application\n\n### Manifest\n\nIt is mandatory that your app exposes a `manifest.json` file in the root dir with this structure:\n\n```json\n{\n  \"name\": \"YourAppName\",\n  \"description\": \"A description of what your app do\",\n  \"icons\": [\n    {\n      \"src\": \"/myAppIcon.svg\",\n      \"type\": \"image/svg+xml\",\n      \"sizes\": \"any\"\n    }\n  ]\n}\n```\n\n> Note: icons[n].src it's the public relative path where the Safe will try to load your app icon. For this example, it should be https://yourAppUrl/myAppIcon.svg.\n\nWe are following the [Manifest spec](https://developer.mozilla.org/en-US/docs/Web/Manifest) so you can find more info about how to fill the `icons` field there.\n\n### CORS\n\nAs the Safe app is included into the Safe application via an iframe it is required to enable **Cross Site Requests** by setting the **CORS** headers when serving the Safe app.\n\nThe required headers are:\n\n```\n\"Access-Control-Allow-Origin\": \"\\*\",\n\"Access-Control-Allow-Methods\": \"GET\",\n\"Access-Control-Allow-Headers\": \"X-Requested-With, content-type, Authorization\"\n```\n\n### React development\n\nIt is possible to use the local React development server. For this you need to set the **CORS** headers and make sure to use the same protocol (http or https) as the Safe interface.\n\n#### CORS\n\nFor this we recommend to use [react-app-rewired](https://www.npmjs.com/package/react-app-rewired). To enable the library update the `scripts` section in the `package.json`:\n\n```json\n\"scripts\": {\n  \"start\": \"react-app-rewired start\",\n  \"build\": \"react-app-rewired build\",\n  \"test\": \"react-app-rewired test\"\n},\n```\n\nAdditionally, you need to create the `config-overrides.js` file in the root of the project to confirgure the **CORS** headers. The content of the file should be:\n\n```js\n/* config-overrides.js */\n\nmodule.exports = {\n  // The function to use to create a webpack dev server configuration when running the development\n  // server with 'npm run start' or 'yarn start'.\n  // Example: set the dev server to use a specific certificate in https.\n  devServer: function (configFunction) {\n    // Return the replacement function for create-react-app to use to generate the Webpack\n    // Development Server config. \"configFunction\" is the function that would normally have\n    // been used to generate the Webpack Development server config - you can use it to create\n    // a starting configuration to then modify instead of having to create a config from scratch.\n    return function (proxy, allowedHost) {\n      // Create the default config by calling configFunction with the proxy/allowedHost parameters\n      const config = configFunction(proxy, allowedHost);\n\n      config.headers = {\n        'Access-Control-Allow-Origin': '*',\n        'Access-Control-Allow-Methods': 'GET',\n        'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',\n      };\n\n      // Return your customised Webpack Development Server config.\n      return config;\n    };\n  },\n};\n```\n\n#### SSL\n\nTo enable SSL with `react-scripts` it is necessary to set the `HTTPS` environment variable to `true`. This can be done in the `package.json` file by adjusting the `scripts` section to:\n\n```json\n\n\"scripts\": {\n  \"start\": \"HTTPS=true react-app-rewired start\",\n},\n```\n\nAs in most cases the SSL certificate provided by `react-scripts` is not valid it is required to mark it as trusted in your browser. For this open the Safe App in a separate tab (not in the Safe interface) and accept the certificate/ ignore the warning.\n\n### Loading the Safe App\n\nWhile developing your Safe App you can directly use [our production interface](https://app.safe.global) for testing it. Some testnets like Goerli are also available there.\nOnce your app is live, even if you are running it locally, you can import it to the Safe application as a custom app. To do so, you should select the \"Apps\" tab:\n\n![Apps section button][safeappstab]\n\n[safeappstab]: https://raw.githubusercontent.com/safe-global/safe-apps-sdk/main/assets/safe-tab-apps.png 'Safe: Apps tab'\n\nUse the `Add custom app` button and add your app using a link:\n\n![Add custom Safe App form][safeaddapp]\n\n[safeaddapp]: https://raw.githubusercontent.com/safe-global/safe-apps-sdk/main/assets/third-party-app-modal.png 'Safe: Add Safe App'\n\n## Deploy to IPFS\n\nThis requires that you have `ipfs` installed ([Instructions](https://gist.github.com/MiguelBel/b3b5f711aa8d9362afa5f16e4e972461))\n\n```bash\nyarn build\nipfs add -r build\n```\n\n## Examples of applications built with this SDK\n\n- https://github.com/safe-global/safe-react-apps\n- https://github.com/Uxio0/safe-react-collectibles\n- https://docs.safe.global/safe-core-aa-sdk/safe-apps#existing-safe-apps\n\n## License\n\nThis library is released under MIT.\n\n## Contributors\n\n- Nicolás Domínguez ([nicosampler](https://github.com/nicosampler))\n- Richard Meissner ([rmeissner](https://github.com/rmeissner))\n","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","default":"./dist/cjs/index.js"}},"gitHead":"2b1e7250f830d481b26e7be5e59f610942e12506","scripts":{"test":"jest","build":"yarn rimraf ./dist && yarn build:cjs && yarn build:esm && yarn build:types","prebuild":"node -p \"'export const getSDKVersion = () => \\'' + require('./package.json').version.split('-')[0] + '\\';'\" > src/version.ts","build:cjs":"tsc --project tsconfig.json --module commonjs --outDir ./dist/cjs && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json","build:esm":"tsc --project tsconfig.json --module es2020 --outDir ./dist/esm && echo '{\"type\": \"module\"}' > ./dist/esm/package.json","build:types":"tsc --project tsconfig.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap"},"_npmUser":{"name":"dasanra","email":"daniel@safe.global"},"repository":{"url":"git+https://github.com/safe-global/safe-apps-sdk.git","type":"git"},"_npmVersion":"10.2.3","description":"SDK developed to integrate third-party apps with Safe app.","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"viem":"^1.6.0","@safe-global/safe-gateway-typescript-sdk":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/safe-apps-sdk_9.0.0-next.1_1703170139890_0.6668806224851143","host":"s3://npm-registry-packages"}},"9.0.0":{"name":"@safe-global/safe-apps-sdk","version":"9.0.0","keywords":["Safe","sdk","apps"],"author":{"url":"https://safe.global","name":"Safe"},"license":"MIT","_id":"@safe-global/safe-apps-sdk@9.0.0","maintainers":[{"name":"germartinez","email":"germaga92@gmail.com"},{"name":"dasanra","email":"daniel@safe.global"}],"homepage":"https://github.com/safe-global/safe-apps-sdk#readme","bugs":{"url":"https://github.com/safe-global/safe-apps-sdk/issues"},"dist":{"shasum":"56635663f5a73773c5929d9c45ffea2b75dab69b","tarball":"https://registry.npmjs.org/@safe-global/safe-apps-sdk/-/safe-apps-sdk-9.0.0.tgz","fileCount":200,"integrity":"sha512-fEqmQBU3JqTjORSl3XYrcaxdxkUqeeM39qsQjqCzzTHioN8DEfg3JCLq6EBoXzcKTVOYi8SPzLV7KJccdDw+4w==","signatures":[{"sig":"MEYCIQCiwES/RyuIu1BFRIaM1VPEyRgkakIHMcHOWWwVvxg6oAIhAIH+Z3UQ9fQ++2SuVx/PqzIDc3XRydUN9MTqkTjbH0ug","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":247682},"main":"dist/cjs/index.js","type":"module","types":"dist/types/index.d.ts","module":"dist/esm/index.js","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","default":"./dist/cjs/index.js"}},"gitHead":"6904e4eb71b5a1192572c75ebf66dc9e4040dd7c","scripts":{"test":"jest","build":"yarn rimraf ./dist && yarn build:cjs && yarn build:esm && yarn build:types","prebuild":"node -p \"'export const getSDKVersion = () => \\'' + require('./package.json').version.split('-')[0] + '\\';'\" > src/version.ts","build:cjs":"tsc --project tsconfig.json --module commonjs --outDir ./dist/cjs && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json","build:esm":"tsc --project tsconfig.json --module es2020 --outDir ./dist/esm && echo '{\"type\": \"module\"}' > ./dist/esm/package.json","build:types":"tsc --project tsconfig.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap"},"_npmUser":{"name":"dasanra","email":"daniel@safe.global"},"repository":{"url":"git+https://github.com/safe-global/safe-apps-sdk.git","type":"git"},"_npmVersion":"10.2.3","description":"SDK developed to integrate third-party apps with Safe app.","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"viem":"^1.6.0","@safe-global/safe-gateway-typescript-sdk":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/safe-apps-sdk_9.0.0_1704813756503_0.8915420895963855","host":"s3://npm-registry-packages"}},"9.1.0":{"name":"@safe-global/safe-apps-sdk","version":"9.1.0","keywords":["Safe","sdk","apps"],"author":{"url":"https://safe.global","name":"Safe"},"license":"MIT","_id":"@safe-global/safe-apps-sdk@9.1.0","maintainers":[{"name":"germartinez","email":"germaga92@gmail.com"},{"name":"dasanra","email":"daniel@safe.global"}],"homepage":"https://github.com/safe-global/safe-apps-sdk#readme","bugs":{"url":"https://github.com/safe-global/safe-apps-sdk/issues"},"dist":{"shasum":"0e65913e0f202e529ed3c846e0f5a98c2d35aa98","tarball":"https://registry.npmjs.org/@safe-global/safe-apps-sdk/-/safe-apps-sdk-9.1.0.tgz","fileCount":200,"integrity":"sha512-N5p/ulfnnA2Pi2M3YeWjULeWbjo7ei22JwU/IXnhoHzKq3pYCN6ynL9mJBOlvDVv892EgLPCWCOwQk/uBT2v0Q==","signatures":[{"sig":"MEUCIQCBfKrN9bjTV3fsk6QU3UpcGPPpSR7BQPoDnVsgWz33ywIgDxR+90xpCRcpM/9BdToICYf53hQpMCcb41SjE19Mtw8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":247011},"main":"dist/cjs/index.js","type":"module","types":"dist/types/index.d.ts","module":"dist/esm/index.js","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","default":"./dist/cjs/index.js"}},"gitHead":"5f9ef7072e32670a71e35d390cfdeb5fc504efcf","scripts":{"test":"jest","build":"yarn rimraf ./dist && yarn build:cjs && yarn build:esm && yarn build:types","prebuild":"node -p \"'export const getSDKVersion = () => \\'' + require('./package.json').version.split('-')[0] + '\\';'\" > src/version.ts","build:cjs":"tsc --project tsconfig.json --module commonjs --outDir ./dist/cjs && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json","build:esm":"tsc --project tsconfig.json --module es2020 --outDir ./dist/esm && echo '{\"type\": \"module\"}' > ./dist/esm/package.json","build:types":"tsc --project tsconfig.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap"},"_npmUser":{"name":"dasanra","email":"daniel@safe.global"},"repository":{"url":"git+https://github.com/safe-global/safe-apps-sdk.git","type":"git"},"_npmVersion":"10.7.0","description":"SDK developed to integrate third-party apps with Safe app.","directories":{},"sideEffects":false,"_nodeVersion":"18.20.3","dependencies":{"viem":"^2.1.1","@safe-global/safe-gateway-typescript-sdk":"^3.5.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/safe-apps-sdk_9.1.0_1718205258507_0.3015368566422867","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-01-26T16:38:00.203Z","modified":"2026-08-13T14:24:20.475Z","7.9.0":"2023-01-26T16:38:00.446Z","7.10.0":"2023-02-14T16:00:07.494Z","7.10.1":"2023-03-15T14:15:47.582Z","7.11.0":"2023-05-04T15:45:50.739Z","8.0.0":"2023-06-23T09:44:58.017Z","8.1.0":"2023-08-10T09:56:18.212Z","9.0.0-next.0":"2023-08-25T14:04:25.308Z","9.0.0-next.1":"2023-12-21T14:49:00.127Z","9.0.0":"2024-01-09T15:22:36.702Z","9.1.0":"2024-06-12T15:14:18.732Z"},"bugs":{"url":"https://github.com/safe-global/safe-apps-sdk/issues"},"author":{"url":"https://safe.global","name":"Safe"},"license":"MIT","homepage":"https://github.com/safe-global/safe-apps-sdk#readme","keywords":["Safe","sdk","apps"],"repository":{"url":"git+https://github.com/safe-global/safe-apps-sdk.git","type":"git"},"description":"SDK developed to integrate third-party apps with Safe app.","maintainers":[{"email":"daniel@safe.global","name":"dasanra"},{"email":"valens@safe.global","name":"zalens02"},{"email":"yago@safe.global","name":"yagopv"},{"email":"akshay.ap95@gmail.com","name":"akshay-ap"}],"readme":"# Safe Apps SDK\n\n[![npm](https://img.shields.io/npm/v/@safe-global/safe-apps-sdk)](https://www.npmjs.com/package/@safe-global/safe-apps-sdk)\n\nSoftware development kit to integrate third-party applications (Safe Apps) with Safe (https://app.safe.global/).\n\n## Install\n\n### Install the package with yarn or npm:\n\n```bash\nyarn add @safe-global/safe-apps-sdk\n\nnpm install @safe-global/safe-apps-sdk\n```\n\n## Build\n\n```bash\nyarn install\nyarn build\n\nnpm install\nnpm build\n```\n\nThere are differences in arguments for `sed` unix utility on MacOS and Linux:\nFor MacOS it should be:\n\n```\n  \"format-dist\": \"sed -i '' 's/\\\"files\\\":/\\\"_files\\\":/' dist/package.json\"\n```\n\nAnd for Linux:\n\n```\n  \"format-dist\": \"sed -i 's/\\\"files\\\":/\\\"_files\\\":/' dist/package.json\",\n```\n\n## Documentation\n\nApps built with the Safe Apps SDK are meant to be run in an iframe inside the Safe Web UI.\nThis library exposes a class as a default export. It accepts an optional options object:  \n`allowedDomains` - Array of regular expressions for origins to accept messages from. If not passed, accepts\nmessages from all domains  \n`debug` - Boolean. If enabled, it will log outgoing/incoming messages.\n\n```ts\nimport SafeAppsSDK from '@safe-global/safe-apps-sdk';\n\ntype Opts = {\n  allowedDomains?: RegExp[];\n  debug?: boolean;\n};\n\nconst opts: Opts = {\n  allowedDomains: [/^app\\.safe\\.global$/],\n  debug: false,\n};\n\nconst appsSdk = new SafeAppsSDK(opts);\n```\n\nThe instance allows you to interact with the Safe application.\n\n## Safe\n\n### Getting Safe information\n\nSafe information can be obtained by calling `.safe.getInfo()`\n\n```js\nconst safe = await appsSdk.safe.getInfo();\n// {\n//   \"safeAddress\": \"0x2fC97b3c7324EFc0BeC094bf75d5dCdFEb082C53\",\n//   \"chainId\": 4\n// }\n```\n\n### Getting Chain information\n\nChain information can be obtained by calling `.safe.getChainInfo()`\n\n```js\nconst chain = await appsSdk.safe.getChainInfo();\n// {\n//   chainName: \"Rinkeby\",\n//   chainId: \"4\",\n//   shortName: \"rin\",\n//   nativeCurrency: {\n//     name: \"Ether\",\n//     symbol: \"ETH\",\n//     decimals: 18,\n//     logoUri:\n//       \"https://safe-transaction-assets.gnosis-safe.io/chains/4/currency_logo.png\",\n//   },\n//   blockExplorerUriTemplate: {\n//     address: \"https://rinkeby.etherscan.io/address/{{address}}\",\n//     txHash: \"https://rinkeby.etherscan.io/tx/{{txHash}}\",\n//     api: \"https://api-rinkeby.etherscan.io/api?module={{module}}&action={{action}}&address={{address}}&apiKey={{apiKey}}\",\n//   },\n// }\n```\n\n### Getting Safe Balances\n\nSafe Balances can be obtained by calling `.safe.experimental_getBalances()`. This method is experimental and may be changed to return paginated results.\n\nIt accepts an optional object argument with `currency` property.\n`currency` - [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code as string\n\n```js\nconst safe = await appsSdk.safe.experimental_getBalances({ currency: 'rub' });\n// {\n//   \"fiatTotal\": \"0\",\n//   \"items\": [\n//     {\n//     \"tokenInfo\": {\n//       \"type\": \"ETHER\",\n//       \"address\": \"0x0000000000000000000000000000000000000000\",\n//       \"decimals\": 18,\n//       \"symbol\": \"ETH\",\n//       \"name\": \"Ether\",\n//       \"logoUri\": null\n//     },\n//     \"balance\": \"0\",\n//     \"fiatBalance\": \"0\",\n//     \"fiatConversion\": \"222297.29\"\n//     }\n//   ]\n// }\n```\n\nFor detailed returned data types, please check our [type declaration file](/packages/safe-apps-sdk/src/types.ts#L203-L227)\n\n### Sending TXs\n\nSending a TX through the Safe is as simple as invoking `.txs.send()`\n\n```js\n// Create a web3 instance\nconst web3 = new Web3('https://goerli.infura.io/v3/{YOUR_API_KEY}');\nconst contract = new web3.eth.Contract(abi, contractAddress);\n\nconst txs = [\n  {\n    to: someAddress,\n    value: 0,\n    data: contract.methods.someMethod().encodeABI(),\n  },\n  {\n    to: someAddress2,\n    value: 0,\n    data: contract.methods.someOtherMethod().encodeABI(),\n  },\n];\n\nconst params = {\n  safeTxGas: 500000,\n};\n\ntry {\n  const txs = await appsSdk.txs.send({ txs, params });\n  // { safeTxHash: '0x...' }\n} catch (err) {\n  console.error(err.message);\n}\n```\n\n> Note: `value` accepts a number or a string as a decimal or hex number.\n\n### Signing messages\n\n#### Off-chain signing\n\nSigning a message off-chain first requires dispatching a `safe_setSettings` RPC call (via `sdk.eth.setSafeSettings()`) with the `offChainSigning` flag set to `true`. Then the relevant `signMessage`/`signTypedData` needs to be called, proposing a message to our services that can then be approved by Safe owners.\n\n```js\nconst settings = {\n  offChainSigning: true,\n};\n\nconst currentSettings = await appsSdk.eth.setSafeSettings([settings]);\n\nconst message = \"I'm the owner of wallet 0x000000\";\nconst hash = await sdk.txs.signMessage(message);\n// { messageHash: '0x...' }\n\nconst typedMessage = {\n    ...\n}\nconst hash = await sdk.txs.signTypedMessage(typedMessage);\n// { messageHash: '0x...' }\n```\n\nSigning returns the `messageHash` of the proposed [`SafeMessage`](https://github.com/safe-global/safe-contracts/blob/main/contracts/handler/CompatibilityFallbackHandler.sol#L12) which can be used to fetch the off-chain signature with.\n\n```js\nconst offChainSignature = await sdk.safe.getOffChainSignature(messageHash);\n// '0x123'\n```\n\nThe returned signature will either be an empty string or valid one once the required number of Safe owners have confirmed the message.\n\nTo validate the signature, use `sdk.safe.isMessageSigned()`, passing the signature as the second argument.\n\n```js\nconst message = \"I'm the owner of wallet 0x000000\";\nconst messageIsSigned = await sdk.safe.isMessageSigned(message, signature);\n```\n\n#### On-chain signing\n\nBecause the Safe is a smart contract wallet, it doesn't have a private key that the wallet can use to sign messages. Instead, we have a library to sign messages, and the validation logic follows [EIP-1271 - Standard Signature Validation Method for Contracts](https://eips.ethereum.org/EIPS/eip-1271). Signing a message with the Safe requires sending a Safe transaction that needs to be approved by Safe owners. To dive into the smart contract implementation, you can start with [library tests](https://github.com/safe-global/safe-contracts/blob/ee92957307653ae6cf7312bbcb1a13c6884ea6ea/test/libraries/SignMessageLib.spec.ts) in the safe-contracts repo.\n\nTo trigger the transaction to sign a message, you can use `sdk.txs.signMessage()` or `sdk.txs.signTypedMessage()`.\n\n```js\nconst message = \"I'm the owner of wallet 0x000000\";\nconst tx = await sdk.txs.signMessage(message);\n// { safeTxHash: '0x...' }\n\nconst typedMessage = {\n    ...\n}\nconst typedTx = await sdk.txs.signTypedMessage(typedMessage);\n// { safeTxHash: '0x...' }\n```\n\nThe non-typed message will be hashed using [EIP-191](https://eips.ethereum.org/EIPS/eip-191). To calculate the hash, you can use `sdk.safe.calculateMessageHash()`.  \nIn case of a typed message, it will be hashed according to [EIP-712](https://eips.ethereum.org/EIPS/eip-712) standard. To calculate message hash, you can use `sdk.safe.calculateTypedMessageHash()`:\n\n```js\nconst messageHash = sdk.safe.calculateMessageHash(message);\n\nconst typedMessageHash = sdk.safe.calculateTypedMessageHash(typedMessage);\n```\n\nTo validate if the message is signed, use `sdk.safe.isMessageSigned()`\n\n```js\nconst message = \"I'm the owner of wallet 0x000000\";\nconst messageIsSigned = await sdk.safe.isMessageSigned(message);\n```\n\n### Retrieving transaction's status\n\nOnce you received safe transaction hash, you might want to get the status of the transaction (was it executed? how many confirmations does it have?):\n\n```js\nconst tx = await sdk.txs.getBySafeTxHash(safeTxHash);\n```\n\nIt will return a [GatewayTransactionDetails](src/types/gateway.ts#L222-L230) structure or throw an error if the backend hasn't synced the transaction yet\n\n### Requesting the Address Book\n\nThe Address Book can be obtained by calling `.safe.requestAddressBook()`. This method is restricted so it needs to be approved by the current connected Safe owner if the caller doesn't have granted permissions.\n\nAll the flow for making the request is handled by the SDK so developers only need to use this method and the rest will be handled by the SDK and the Web UI.\n\n```js\nconst addressBook = await appsSdk.safe.requestAddressBook();\n// [\n//   {\n//     address: '0x0',\n//     chainId: '4',\n//     name: 'Entry 1',\n//   },\n//   {\n//     address: '0x1',\n//     chainId: '4',\n//     name: 'Entry 2',\n//   },\n// ];\n```\n\nReturns an array of [AddressBookItem](src/types/sdk.ts#L55-L59)\n\n### Managing permissions\n\nUsually you are not going to use these methods because restricted methods as `requestAddressBook` handle all the logic for you.\n\nHowever as part of the internal implementation for the [EIP-2255](https://eips.ethereum.org/EIPS/eip-2255) you now have accessible 2 more methods under the `wallet` section in the SDK.\n\n**Get permissions**\n\n```js\nawait appsSdk.wallet.getPermissions();\n// [\n//   {\n//     parentCapability: \"requestAddressBook\",\n//     invoker: \"https://invoker-dapp.eth\",\n//     date: 1658499292741,\n//     caveats: [],\n//   }\n// ]\n```\n\nReturns an array of [permissions](src/types/permissions.ts#L1-L6) granted to the dapp.\n\n**Request Permissions**\n\nFor requesting permissions you should call the `requestPermissions` method that accepts a parameter with an array of [requested permissions](src/types/permissions.ts#L8-L10).\n\n```js\nawait appsSdk.wallet.requestPermissions([{ requestAddressBook: {} }]);\n// [\n//   {\n//     parentCapability: \"requestAddressBook\",\n//     invoker: \"https://invoker-dapp.eth\",\n//     date: 1658499292741,\n//     caveats: [],\n//   }\n// ]\n```\n\nReturns an array of [permissions](src/types/permissions.ts#L1-L6) granted to the dapp. If the permissions are not currently granted then the user will be prompted from the Web UI (only first time) about granting the corresponding permissions.\n\n## RPC Calls\n\nThe SDK exposes some of Ethereum's [JSON-RPC API](https://eth.wiki/json-rpc/API), namely the read methods.\n\n### The default block parameter\n\nThe following methods have an extra default block parameter:\n\n- getBalance\n- getCode\n- getStorageAt\n- call\n\nWhen requests are made that act on the state of ethereum, the last default block parameter determines the height of the block.\n\nThe following options are possible for the defaultBlock parameter:\n\n`HEX String` - an integer block number  \n`String \"earliest\"` for the earliest/genesis block  \n`String \"latest\"` - for the latest mined block (default)  \n`String \"pending\"` - for the pending state/transactions\n\n### getBalance\n\nReturns the balance of the account of given address.\n\n```js\nconst balance = await appsSdk.eth.getBalance(['0x...']);\n```\n\n### getCode\n\nReturns code at a given address.\n\n```js\nconst code = await appsSdk.eth.getCode(['0x...']);\n```\n\n### getStorageAt\n\nReturns the value from a storage position at a given address.\n\n```js\nconst value = await appsSdk.eth.getStorageAt(['0x...', 0]);\n```\n\n### call\n\nExecutes a new message call immediately without creating a transaction on the block chain.\n\n```js\nconst config = {\n  from: '0x0000000000000000000000000000000000000000',\n  to: '0x0000000000000000000000000000000000000000',\n};\n\nconst result = await appsSdk.eth.call([config]);\n```\n\nThe transaction call object:  \n`from` - (optional) The address the transaction is sent from.  \n`to` 20 Bytes - The address the transaction is directed to.  \n`gas` - (optional) Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.  \n`gasPrice` - (optional) Integer of the gasPrice used for each paid gas  \n`value` - (optional) Integer of the value sent with this transaction  \n`data` - (optional) Hash of the method signature and encoded parameters. For details see [Ethereum Contract ABI in the Solidity documentation](https://docs.soliditylang.org/en/latest/abi-spec.html)\n\n### getPastLogs\n\nReturns an array of all logs matching a given filter object.\n\n```js\nconst params = [\n  {\n    fromBlock: 11054275,\n    toBlock: 'latest',\n  },\n];\n\nconst logs = await appsSdk.eth.getPastLogs([params]);\n```\n\nThe filter options:  \n`fromBlock` - Integer block number, or \"latest\" for the last mined block or \"pending\", \"earliest\" for not yet mined transactions.  \n`toBlock` - Integer block number, or \"latest\" for the last mined block or \"pending\", \"earliest\" for not yet mined transactions.  \n`address` - (optional) Contract address or a list of addresses from which logs should originate.  \n`topics` - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with “or” options.\n\n### getBlockByHash\n\nReturns information about a block by hash.\n\n```js\nconst hash = '0x1955a9f306903669e295196752b11bc0dee33b48cabdf44b1103b7cea086cae7';\n\nconst block = await appsSdk.eth.getBlockByHash([hash, true]);\n```\n\nParameters  \n`DATA` - Hash of a block.  \n`Boolean` (default: false) - If true it returns the full transaction objects, if false only the hashes of the transactions.\n\n### getBlockByNumber\n\nReturns information about a block by block number.\n\n```js\nconst number = 11054275;\n\nconst block = await appsSdk.eth.getBlockByNumber([number]);\n```\n\nParameters  \n`QUANTITY|TAG` - integer of a block number, or the string \"earliest\", \"latest\" or \"pending\", as in the default block parameter.\n`Boolean` (default: false) - If true it returns the full transaction objects, if false only the hashes of the transactions.\n\n### getTransactionByHash\n\nReturns the information about a transaction requested by transaction hash.\n\n```js\nconst tx = await appsSdk.eth.getTransactionByHash([\n  '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b',\n]);\n```\n\n### getTransactionReceipt\n\nReturns the receipt of a transaction by transaction hash.\n\n> Note: That the receipt is not available for pending transactions.\n\n```js\nconst tx = await appsSdk.eth.getTransactionReceipt([\n  '0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238',\n]);\n```\n\n### setSafeSettings\n\nSets settings of the currently opened Safe.\n\n> Note: Returns the new `SafeSettings`.\n\n```js\nconst settings = {\n  offChainSigning: true,\n};\n\nconst success = await appsSdk.eth.setSafeSettings([settings]);\n```\n\n## Testing in the Safe application\n\n### Manifest\n\nIt is mandatory that your app exposes a `manifest.json` file in the root dir with this structure:\n\n```json\n{\n  \"name\": \"YourAppName\",\n  \"description\": \"A description of what your app do\",\n  \"icons\": [\n    {\n      \"src\": \"/myAppIcon.svg\",\n      \"type\": \"image/svg+xml\",\n      \"sizes\": \"any\"\n    }\n  ]\n}\n```\n\n> Note: icons[n].src it's the public relative path where the Safe will try to load your app icon. For this example, it should be https://yourAppUrl/myAppIcon.svg.\n\nWe are following the [Manifest spec](https://developer.mozilla.org/en-US/docs/Web/Manifest) so you can find more info about how to fill the `icons` field there.\n\n### CORS\n\nAs the Safe app is included into the Safe application via an iframe it is required to enable **Cross Site Requests** by setting the **CORS** headers when serving the Safe app.\n\nThe required headers are:\n\n```\n\"Access-Control-Allow-Origin\": \"\\*\",\n\"Access-Control-Allow-Methods\": \"GET\",\n\"Access-Control-Allow-Headers\": \"X-Requested-With, content-type, Authorization\"\n```\n\n### React development\n\nIt is possible to use the local React development server. For this you need to set the **CORS** headers and make sure to use the same protocol (http or https) as the Safe interface.\n\n#### CORS\n\nFor this we recommend to use [react-app-rewired](https://www.npmjs.com/package/react-app-rewired). To enable the library update the `scripts` section in the `package.json`:\n\n```json\n\"scripts\": {\n  \"start\": \"react-app-rewired start\",\n  \"build\": \"react-app-rewired build\",\n  \"test\": \"react-app-rewired test\"\n},\n```\n\nAdditionally, you need to create the `config-overrides.js` file in the root of the project to confirgure the **CORS** headers. The content of the file should be:\n\n```js\n/* config-overrides.js */\n\nmodule.exports = {\n  // The function to use to create a webpack dev server configuration when running the development\n  // server with 'npm run start' or 'yarn start'.\n  // Example: set the dev server to use a specific certificate in https.\n  devServer: function (configFunction) {\n    // Return the replacement function for create-react-app to use to generate the Webpack\n    // Development Server config. \"configFunction\" is the function that would normally have\n    // been used to generate the Webpack Development server config - you can use it to create\n    // a starting configuration to then modify instead of having to create a config from scratch.\n    return function (proxy, allowedHost) {\n      // Create the default config by calling configFunction with the proxy/allowedHost parameters\n      const config = configFunction(proxy, allowedHost);\n\n      config.headers = {\n        'Access-Control-Allow-Origin': '*',\n        'Access-Control-Allow-Methods': 'GET',\n        'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',\n      };\n\n      // Return your customised Webpack Development Server config.\n      return config;\n    };\n  },\n};\n```\n\n#### SSL\n\nTo enable SSL with `react-scripts` it is necessary to set the `HTTPS` environment variable to `true`. This can be done in the `package.json` file by adjusting the `scripts` section to:\n\n```json\n\n\"scripts\": {\n  \"start\": \"HTTPS=true react-app-rewired start\",\n},\n```\n\nAs in most cases the SSL certificate provided by `react-scripts` is not valid it is required to mark it as trusted in your browser. For this open the Safe App in a separate tab (not in the Safe interface) and accept the certificate/ ignore the warning.\n\n### Loading the Safe App\n\nWhile developing your Safe App you can directly use [our production interface](https://app.safe.global) for testing it. Some testnets like Goerli are also available there.\nOnce your app is live, even if you are running it locally, you can import it to the Safe application as a custom app. To do so, you should select the \"Apps\" tab:\n\n![Apps section button][safeappstab]\n\n[safeappstab]: https://raw.githubusercontent.com/safe-global/safe-apps-sdk/main/assets/safe-tab-apps.png 'Safe: Apps tab'\n\nUse the `Add custom app` button and add your app using a link:\n\n![Add custom Safe App form][safeaddapp]\n\n[safeaddapp]: https://raw.githubusercontent.com/safe-global/safe-apps-sdk/main/assets/third-party-app-modal.png 'Safe: Add Safe App'\n\n## Deploy to IPFS\n\nThis requires that you have `ipfs` installed ([Instructions](https://gist.github.com/MiguelBel/b3b5f711aa8d9362afa5f16e4e972461))\n\n```bash\nyarn build\nipfs add -r build\n```\n\n## Examples of applications built with this SDK\n\n- https://github.com/safe-global/safe-react-apps\n- https://github.com/Uxio0/safe-react-collectibles\n- https://docs.safe.global/safe-core-aa-sdk/safe-apps#existing-safe-apps\n\n## License\n\nThis library is released under MIT.\n\n## Contributors\n\n- Nicolás Domínguez ([nicosampler](https://github.com/nicosampler))\n- Richard Meissner ([rmeissner](https://github.com/rmeissner))\n","readmeFilename":"README.md"}