{"_id":"@1sat/extension","_rev":"15-c641a922646ebb20f01b931a0908b014","name":"@1sat/extension","dist-tags":{"latest":"0.0.15"},"versions":{"0.0.1":{"name":"@1sat/extension","version":"0.0.1","keywords":["1sat","ordinals","bsv","bitcoin","wallet","extension","chrome"],"license":"MIT","_id":"@1sat/extension@0.0.1","maintainers":[{"name":"wildsatchmo","email":"rohenaz@gmail.com"}],"dist":{"shasum":"7b2bb7ea48f6733aa6fd998ce4c97a40d475d7df","tarball":"https://registry.npmjs.org/@1sat/extension/-/extension-0.0.1.tgz","fileCount":42,"integrity":"sha512-QYj9VyZf6j3M1TWtKJnwgB3+ePOUX/khSpkkR3J0MeZXsdheu7JaBZnR4zZuLBqyw8KlwPnGETrqcP1l7PMWvQ==","signatures":[{"sig":"MEYCIQDiPMgSJSvQvgs5/4aJkh4GGtoklUByeJxUkDwNdPJTBQIhAPSzLpBLYnvhppqf2A6CNvdFDI7VQk2HrMFMB/PZwEiL","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":142471},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./keys":{"types":"./dist/keys.d.ts","import":"./dist/keys.js"},"./popup":{"types":"./dist/popup.d.ts","import":"./dist/popup.js"},"./storage":{"types":"./dist/storage.d.ts","import":"./dist/storage.js"}},"gitHead":"d007187f8fdae2489f30a108273d61110a031fdc","scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist"},"_npmUser":{"name":"wildsatchmo","email":"rohenaz@gmail.com"},"_npmVersion":"11.3.0","description":"Build browser wallet extensions that implement window.onesat","directories":{},"_nodeVersion":"24.0.2","dependencies":{"bitcoin-backup":"^0.0.5","webextension-polyfill":"^0.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@bsv/sdk":"^1.9.24","typescript":"^5.9.3","@types/chrome":"^0.0.287","@types/webextension-polyfill":"^0.12.4"},"peerDependencies":{"@bsv/sdk":"^1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.0.1_1765842768480_0.1530343322980121","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@1sat/extension","version":"0.0.2","keywords":["1sat","ordinals","bsv","bitcoin","wallet","extension","chrome"],"license":"MIT","_id":"@1sat/extension@0.0.2","maintainers":[{"name":"wildsatchmo","email":"rohenaz@gmail.com"}],"dist":{"shasum":"fd7de5e086c7a690f8b84a157de4ee6984596c95","tarball":"https://registry.npmjs.org/@1sat/extension/-/extension-0.0.2.tgz","fileCount":42,"integrity":"sha512-RF6/aTaIE49kCxNf62H74DfTlA+QpwdNvc5h3ar7SSKx2J2+DHkjyStSQFfTgEICnj8fDzyuc5CKnAVru2pvGg==","signatures":[{"sig":"MEQCIG99xF5Zwk+bXLhj4yIk3IEZs0jTnra37e/W7boqnMrnAiB/Y7u0AijvNT5QAiJLB5x+vUh7R1e1tRVORLooIxbwAg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":163928},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./keys":{"types":"./dist/keys.d.ts","import":"./dist/keys.js"},"./popup":{"types":"./dist/popup.d.ts","import":"./dist/popup.js"},"./storage":{"types":"./dist/storage.d.ts","import":"./dist/storage.js"}},"gitHead":"d007187f8fdae2489f30a108273d61110a031fdc","scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist"},"_npmUser":{"name":"wildsatchmo","email":"rohenaz@gmail.com"},"_npmVersion":"11.3.0","description":"Build browser wallet extensions that implement window.onesat","directories":{},"_nodeVersion":"24.0.2","dependencies":{"bitcoin-backup":"^0.0.5","webextension-polyfill":"^0.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@bsv/sdk":"^1.9.24","typescript":"^5.9.3","@types/chrome":"^0.0.287","@types/webextension-polyfill":"^0.12.4"},"peerDependencies":{"@bsv/sdk":"^1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.0.2_1765846497498_0.5040241674427381","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@1sat/extension","version":"0.0.3","keywords":["1sat","ordinals","bsv","bitcoin","wallet","extension","chrome"],"license":"MIT","_id":"@1sat/extension@0.0.3","maintainers":[{"name":"dcasegr","email":"david.case@shruggr.cloud"},{"name":"wildsatchmo","email":"rohenaz@gmail.com"}],"dist":{"shasum":"a24e11b3b5351dd9c1e7abf9d138c68e33a4d806","tarball":"https://registry.npmjs.org/@1sat/extension/-/extension-0.0.3.tgz","fileCount":42,"integrity":"sha512-U61632L+Juv+uH9Kf9XE/FAHe8VuP8p/+gzHMHm4vf8qonypPEV046x3EYjT5IYSKIgOWjZZJSdEYei3z+UPaA==","signatures":[{"sig":"MEUCIBx8Qjs2GrsauN2smR/Haroe1HHgf4CDI5kQuZJQEfnpAiEAr/hPk8iYDCfrWlR4Zi03lzOTWoS3pppchRw32Vtuur8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":164032},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"a24e11b3b5351dd9c1e7abf9d138c68e33a4d806","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./keys":{"types":"./dist/keys.d.ts","import":"./dist/keys.js"},"./popup":{"types":"./dist/popup.d.ts","import":"./dist/popup.js"},"./storage":{"types":"./dist/storage.d.ts","import":"./dist/storage.js"}},"scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist"},"_npmUser":{"name":"dcasegr","email":"david.case@shruggr.cloud"},"_integrity":"sha512-U61632L+Juv+uH9Kf9XE/FAHe8VuP8p/+gzHMHm4vf8qonypPEV046x3EYjT5IYSKIgOWjZZJSdEYei3z+UPaA==","_npmVersion":"10.8.3","description":"Build browser wallet extensions that implement window.onesat","directories":{},"_nodeVersion":"22.6.0","dependencies":{"bitcoin-backup":"^0.0.5","webextension-polyfill":"^0.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@bsv/sdk":"^2.0.1","typescript":"^5.9.3","@types/chrome":"^0.0.287","@types/webextension-polyfill":"^0.12.4"},"peerDependencies":{"@bsv/sdk":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.0.3_1770401608626_0.09716631640685214","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@1sat/extension","version":"0.0.4","keywords":["1sat","ordinals","bsv","bitcoin","wallet","extension","chrome"],"license":"MIT","_id":"@1sat/extension@0.0.4","maintainers":[{"name":"dcasegr","email":"david.case@shruggr.cloud"},{"name":"wildsatchmo","email":"rohenaz@gmail.com"}],"dist":{"shasum":"22bb9cdeaf777dcc084fa9a02473e04c4ed11437","tarball":"https://registry.npmjs.org/@1sat/extension/-/extension-0.0.4.tgz","fileCount":42,"integrity":"sha512-wRQ94cQmwMca7SACA7WwHPpBUwa+mmpr56KMnD6T0BADyVS73flEQUh+wyJ33T/HRkoJxkyN77MA6SHOt2a7JQ==","signatures":[{"sig":"MEQCIHXKVbY+qaPqs60ZyBE0oDrBbb2Fwo3tD9lPSRDjX3siAiAZ8dr+4o4DdzNaJbBxcewHGrLs449v4bexX1AqTTZVlA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":164032},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"22bb9cdeaf777dcc084fa9a02473e04c4ed11437","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./keys":{"types":"./dist/keys.d.ts","import":"./dist/keys.js"},"./popup":{"types":"./dist/popup.d.ts","import":"./dist/popup.js"},"./storage":{"types":"./dist/storage.d.ts","import":"./dist/storage.js"}},"scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist"},"_npmUser":{"name":"wildsatchmo","email":"rohenaz@gmail.com"},"_integrity":"sha512-wRQ94cQmwMca7SACA7WwHPpBUwa+mmpr56KMnD6T0BADyVS73flEQUh+wyJ33T/HRkoJxkyN77MA6SHOt2a7JQ==","_npmVersion":"10.8.3","description":"Build browser wallet extensions that implement window.onesat","directories":{},"_nodeVersion":"24.3.0","dependencies":{"bitcoin-backup":"^0.0.5","webextension-polyfill":"^0.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@bsv/sdk":"^2.0.4","typescript":"^5.9.3","@types/chrome":"^0.0.287","@types/webextension-polyfill":"^0.12.4"},"peerDependencies":{"@bsv/sdk":"^2.0.4"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.0.4_1771985434500_0.7430128072804376","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@1sat/extension","version":"0.0.5","keywords":["1sat","ordinals","bsv","bitcoin","wallet","extension","chrome"],"license":"MIT","_id":"@1sat/extension@0.0.5","maintainers":[{"name":"dcasegr","email":"david.case@shruggr.cloud"},{"name":"wildsatchmo","email":"rohenaz@gmail.com"}],"dist":{"shasum":"4b172380cc1561029741b469ff16bd3fcc34af07","tarball":"https://registry.npmjs.org/@1sat/extension/-/extension-0.0.5.tgz","fileCount":42,"integrity":"sha512-uOPRxO7La6p6xhHuuYHoCbjVYPIyeuxT1KAMJ7FKcLLIq6tiKwrUzjBCOHsW5D+qqLzsgkVONt3JMEGpIky4dg==","signatures":[{"sig":"MEYCIQD16SkYMMJ1HMe5TTD+1v2sMxlq25pLvm6HOJVGWq+/xQIhAI1Tqf2TAbNY3viY5Tou0ux43R8n9bUY3DgzSPxSOoLT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":164032},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"4b172380cc1561029741b469ff16bd3fcc34af07","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./keys":{"types":"./dist/keys.d.ts","import":"./dist/keys.js"},"./popup":{"types":"./dist/popup.d.ts","import":"./dist/popup.js"},"./storage":{"types":"./dist/storage.d.ts","import":"./dist/storage.js"}},"scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist"},"_npmUser":{"name":"dcasegr","email":"david.case@shruggr.cloud"},"_integrity":"sha512-uOPRxO7La6p6xhHuuYHoCbjVYPIyeuxT1KAMJ7FKcLLIq6tiKwrUzjBCOHsW5D+qqLzsgkVONt3JMEGpIky4dg==","_npmVersion":"10.8.3","description":"Build browser wallet extensions that implement window.onesat","directories":{},"_nodeVersion":"24.3.0","dependencies":{"bitcoin-backup":"^0.0.5","webextension-polyfill":"^0.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@bsv/sdk":"^2.0.6","typescript":"^5.9.3","@types/chrome":"^0.0.287","@types/webextension-polyfill":"^0.12.4"},"peerDependencies":{"@bsv/sdk":"^2.0.6"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.0.5_1774108008423_0.31708360030321026","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"@1sat/extension","version":"0.0.6","keywords":["1sat","ordinals","bsv","bitcoin","wallet","extension","chrome"],"license":"MIT","_id":"@1sat/extension@0.0.6","maintainers":[{"name":"dcasegr","email":"david.case@shruggr.cloud"},{"name":"wildsatchmo","email":"rohenaz@gmail.com"}],"dist":{"shasum":"a043204cd526e69e952969c27f002606b01534ea","tarball":"https://registry.npmjs.org/@1sat/extension/-/extension-0.0.6.tgz","fileCount":42,"integrity":"sha512-xS7CKnE5XSu4czSidlb4AmBffLImxVQAH9NufoEAvs+MQOJIxse79/3WUhXacFaBW5wvlpl6FjT0FsuyWL+k/Q==","signatures":[{"sig":"MEYCIQClFHvivIXk7X678Dh5/E+oVpKlFJFmJ942G7D8sr0zuAIhAMXzRlIQekZnXtKPi0edxP2lsuzFhA5OuyYtHuESWQNY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":164044},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"a043204cd526e69e952969c27f002606b01534ea","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./keys":{"types":"./dist/keys.d.ts","import":"./dist/keys.js"},"./popup":{"types":"./dist/popup.d.ts","import":"./dist/popup.js"},"./storage":{"types":"./dist/storage.d.ts","import":"./dist/storage.js"}},"scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist"},"_npmUser":{"name":"dcasegr","email":"david.case@shruggr.cloud"},"_integrity":"sha512-xS7CKnE5XSu4czSidlb4AmBffLImxVQAH9NufoEAvs+MQOJIxse79/3WUhXacFaBW5wvlpl6FjT0FsuyWL+k/Q==","_npmVersion":"10.8.3","description":"Build browser wallet extensions that implement window.onesat","directories":{},"_nodeVersion":"24.3.0","dependencies":{"bitcoin-backup":"^0.0.5","webextension-polyfill":"^0.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@bsv/sdk":"^2.0.13","typescript":"^5.9.3","@types/chrome":"^0.0.287","@types/webextension-polyfill":"^0.12.4"},"peerDependencies":{"@bsv/sdk":"^2.0.13"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.0.6_1776368385064_0.566664561172354","host":"s3://npm-registry-packages-npm-production"}},"0.0.7":{"name":"@1sat/extension","version":"0.0.7","keywords":["1sat","ordinals","bsv","bitcoin","wallet","extension","chrome"],"license":"MIT","_id":"@1sat/extension@0.0.7","maintainers":[{"name":"dcasegr","email":"david.case@shruggr.cloud"},{"name":"wildsatchmo","email":"rohenaz@gmail.com"}],"dist":{"shasum":"6ccd1a7eb143135b181f8509c55907f1df49393c","tarball":"https://registry.npmjs.org/@1sat/extension/-/extension-0.0.7.tgz","fileCount":42,"integrity":"sha512-xlBvmXODHWnpq/alMscDwrokWkb2HLSqkOOAWchtVZ3ZIb0ccFqKnArTOE3LSNOhSZ3HnR3nudvAEXHDVGyIUA==","signatures":[{"sig":"MEUCIQD20JTR/NY0lNvxqybwyQHrfV2rRiicVVzoVo0iKkLibwIgW0TG/bG9hQDlzbs7kt2jKW6UaNtApsXj18vAMs62pso=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":164281},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"6ccd1a7eb143135b181f8509c55907f1df49393c","exports":{".":{"bun":"./src/index.ts","types":"./dist/index.d.ts","import":"./dist/index.js"},"./keys":{"bun":"./src/keys.ts","types":"./dist/keys.d.ts","import":"./dist/keys.js"},"./popup":{"bun":"./src/popup.ts","types":"./dist/popup.d.ts","import":"./dist/popup.js"},"./storage":{"bun":"./src/storage.ts","types":"./dist/storage.d.ts","import":"./dist/storage.js"}},"scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist"},"_npmUser":{"name":"dcasegr","email":"david.case@shruggr.cloud"},"_integrity":"sha512-xlBvmXODHWnpq/alMscDwrokWkb2HLSqkOOAWchtVZ3ZIb0ccFqKnArTOE3LSNOhSZ3HnR3nudvAEXHDVGyIUA==","_npmVersion":"10.8.3","description":"Build browser wallet extensions that implement window.onesat","directories":{},"_nodeVersion":"24.3.0","dependencies":{"bitcoin-backup":"^0.0.11","webextension-polyfill":"^0.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@bsv/sdk":"^2.0.13","typescript":"^5.9.3","@types/chrome":"^0.0.287","@types/webextension-polyfill":"^0.12.4"},"peerDependencies":{"@bsv/sdk":"^2.0.13"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.0.7_1776800521292_0.08226178968884201","host":"s3://npm-registry-packages-npm-production"}},"0.0.8":{"name":"@1sat/extension","version":"0.0.8","keywords":["1sat","ordinals","bsv","bitcoin","wallet","extension","chrome"],"license":"MIT","_id":"@1sat/extension@0.0.8","maintainers":[{"name":"dcasegr","email":"david.case@shruggr.cloud"},{"name":"wildsatchmo","email":"rohenaz@gmail.com"}],"dist":{"shasum":"9ffa5331af7e3d9ab2956995e3f3f7f6b5a07e03","tarball":"https://registry.npmjs.org/@1sat/extension/-/extension-0.0.8.tgz","fileCount":42,"integrity":"sha512-zumLK+2oYFHCBrSGv0BG7z2AAJemm5vaSQAOVWoj/S6tf3VOuroMskRpCOXK76t4b46nCZZeIg3X6jv8QbAWmA==","signatures":[{"sig":"MEUCIBZYKVLc6kKLqrr5NgwM+0u129hvgdBUgkXDILWPEaK6AiEAkdTDxJWenlpgVy5wg1EzcFMJGhDzj5Y2jZvwc2SkX48=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":164281},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"9ffa5331af7e3d9ab2956995e3f3f7f6b5a07e03","exports":{".":{"bun":"./src/index.ts","types":"./dist/index.d.ts","import":"./dist/index.js"},"./keys":{"bun":"./src/keys.ts","types":"./dist/keys.d.ts","import":"./dist/keys.js"},"./popup":{"bun":"./src/popup.ts","types":"./dist/popup.d.ts","import":"./dist/popup.js"},"./storage":{"bun":"./src/storage.ts","types":"./dist/storage.d.ts","import":"./dist/storage.js"}},"scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist"},"_npmUser":{"name":"dcasegr","email":"david.case@shruggr.cloud"},"_integrity":"sha512-zumLK+2oYFHCBrSGv0BG7z2AAJemm5vaSQAOVWoj/S6tf3VOuroMskRpCOXK76t4b46nCZZeIg3X6jv8QbAWmA==","_npmVersion":"10.8.3","description":"Build browser wallet extensions that implement window.onesat","directories":{},"_nodeVersion":"24.3.0","dependencies":{"bitcoin-backup":"^0.0.11","webextension-polyfill":"^0.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@bsv/sdk":"^2.0.13","typescript":"^5.9.3","@types/chrome":"^0.0.287","@types/webextension-polyfill":"^0.12.4"},"peerDependencies":{"@bsv/sdk":"^2.0.13"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.0.8_1776825326960_0.019462407462961684","host":"s3://npm-registry-packages-npm-production"}},"0.0.9":{"name":"@1sat/extension","version":"0.0.9","keywords":["1sat","ordinals","bsv","bitcoin","wallet","extension","chrome"],"license":"MIT","_id":"@1sat/extension@0.0.9","maintainers":[{"name":"dcasegr","email":"david.case@shruggr.cloud"},{"name":"wildsatchmo","email":"rohenaz@gmail.com"}],"dist":{"shasum":"9de1766b52e93b7ebdcee57ded2926576ccb4b80","tarball":"https://registry.npmjs.org/@1sat/extension/-/extension-0.0.9.tgz","fileCount":42,"integrity":"sha512-3qytfBTU52hJQIuPWer+eGVtJ4qiJpw9YCjnyASOrbzZ3a5xAh3T+OSBtR8AGUF4nTy0HOVi3M/xj6ogRbE+0A==","signatures":[{"sig":"MEYCIQCdd9zZ5kBJKAyIBTekxkA/i9iHVbfg1lYrel6nfIJiqwIhANUAyqWidXWiEasbSbS+HoUO+lZbMo63NGzPVixtdCeK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":164156},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"9de1766b52e93b7ebdcee57ded2926576ccb4b80","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./keys":{"types":"./dist/keys.d.ts","import":"./dist/keys.js"},"./popup":{"types":"./dist/popup.d.ts","import":"./dist/popup.js"},"./storage":{"types":"./dist/storage.d.ts","import":"./dist/storage.js"}},"scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist"},"_npmUser":{"name":"dcasegr","email":"david.case@shruggr.cloud"},"_integrity":"sha512-3qytfBTU52hJQIuPWer+eGVtJ4qiJpw9YCjnyASOrbzZ3a5xAh3T+OSBtR8AGUF4nTy0HOVi3M/xj6ogRbE+0A==","_npmVersion":"10.8.3","description":"Build browser wallet extensions that implement window.onesat","directories":{},"_nodeVersion":"24.3.0","dependencies":{"bitcoin-backup":"^0.0.11","webextension-polyfill":"^0.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@bsv/sdk":"^2.0.13","typescript":"^5.9.3","@types/chrome":"^0.0.287","@types/webextension-polyfill":"^0.12.4"},"peerDependencies":{"@bsv/sdk":"^2.0.13"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.0.9_1776830812309_0.7292114515144916","host":"s3://npm-registry-packages-npm-production"}},"0.0.10":{"name":"@1sat/extension","version":"0.0.10","keywords":["1sat","ordinals","bsv","bitcoin","wallet","extension","chrome"],"license":"MIT","_id":"@1sat/extension@0.0.10","maintainers":[{"name":"dcasegr","email":"david.case@shruggr.cloud"},{"name":"wildsatchmo","email":"rohenaz@gmail.com"}],"dist":{"shasum":"293edc2b2450b994270f037d54c686bc7aeb4624","tarball":"https://registry.npmjs.org/@1sat/extension/-/extension-0.0.10.tgz","fileCount":42,"integrity":"sha512-UQcVSzHBLR5sQ4ltj3/lg5+6lLTj7QF/DnqHdr/6K3FhN+An3loWbWaM/NOsA1Kg2tJEJWvLtARbVebznUFfxw==","signatures":[{"sig":"MEQCIETsAFYBJ8rGnq+FfQ922C3+oKd0h09i7hAUT+aWAP6BAiBvman/Mp5GGzMin6bAK+ohklf3gYjsWq72NG+A/kOrsg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":164157},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"293edc2b2450b994270f037d54c686bc7aeb4624","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./keys":{"types":"./dist/keys.d.ts","import":"./dist/keys.js"},"./popup":{"types":"./dist/popup.d.ts","import":"./dist/popup.js"},"./storage":{"types":"./dist/storage.d.ts","import":"./dist/storage.js"}},"scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist"},"_npmUser":{"name":"dcasegr","email":"david.case@shruggr.cloud"},"_integrity":"sha512-UQcVSzHBLR5sQ4ltj3/lg5+6lLTj7QF/DnqHdr/6K3FhN+An3loWbWaM/NOsA1Kg2tJEJWvLtARbVebznUFfxw==","_npmVersion":"10.8.3","description":"Build browser wallet extensions that implement window.onesat","directories":{},"_nodeVersion":"24.3.0","dependencies":{"bitcoin-backup":"^0.0.11","webextension-polyfill":"^0.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@bsv/sdk":"^2.0.13","typescript":"^5.9.3","@types/chrome":"^0.0.287","@types/webextension-polyfill":"^0.12.4"},"peerDependencies":{"@bsv/sdk":"^2.0.13"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.0.10_1783887705599_0.18553269726295207","host":"s3://npm-registry-packages-npm-production"}},"0.0.12":{"name":"@1sat/extension","version":"0.0.12","keywords":["1sat","ordinals","bsv","bitcoin","wallet","extension","chrome"],"license":"MIT","_id":"@1sat/extension@0.0.12","maintainers":[{"name":"dcasegr","email":"david.case@shruggr.cloud"},{"name":"wildsatchmo","email":"rohenaz@gmail.com"}],"dist":{"shasum":"89ad747c2787c640d5cf365d5f918e313930123d","tarball":"https://registry.npmjs.org/@1sat/extension/-/extension-0.0.12.tgz","fileCount":42,"integrity":"sha512-rsUA/TASwNQN7e5dpCw+Va2lvOsqK6p4KdND8ZWZJRv3yx8hKjkCwT7bsw+64ThXniAfQOSMojh3hwW6ZDbWWw==","signatures":[{"sig":"MEQCICTAf2mnnIEnPUIprJxYXFVARbJTO1bf3Z3QEHtfAFpSAiAlPZq5FI5yp50UpOreEnufW85FZDZ/Wb6nX1YeSvdtxw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":164053},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"89ad747c2787c640d5cf365d5f918e313930123d","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./keys":{"types":"./dist/keys.d.ts","import":"./dist/keys.js"},"./popup":{"types":"./dist/popup.d.ts","import":"./dist/popup.js"},"./storage":{"types":"./dist/storage.d.ts","import":"./dist/storage.js"}},"scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist"},"_npmUser":{"name":"dcasegr","email":"david.case@shruggr.cloud"},"_integrity":"sha512-rsUA/TASwNQN7e5dpCw+Va2lvOsqK6p4KdND8ZWZJRv3yx8hKjkCwT7bsw+64ThXniAfQOSMojh3hwW6ZDbWWw==","_npmVersion":"10.8.3","description":"Build browser wallet extensions that implement window.onesat","directories":{},"_nodeVersion":"24.3.0","dependencies":{"bitcoin-backup":"^0.0.11","webextension-polyfill":"^0.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@bsv/sdk":"^2.0.13","typescript":"^5.9.3","@types/chrome":"^0.0.287","@types/webextension-polyfill":"^0.12.4"},"peerDependencies":{"@bsv/sdk":"^2.0.13"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.0.12_1783982227723_0.4856832354654024","host":"s3://npm-registry-packages-npm-production"}},"0.0.13":{"name":"@1sat/extension","version":"0.0.13","keywords":["1sat","ordinals","bsv","bitcoin","wallet","extension","chrome"],"license":"MIT","_id":"@1sat/extension@0.0.13","maintainers":[{"name":"dcasegr","email":"david.case@shruggr.cloud"},{"name":"wildsatchmo","email":"rohenaz@gmail.com"}],"dist":{"shasum":"69444ce2c1f9ec009e20d15eed1cbb361f5064e0","tarball":"https://registry.npmjs.org/@1sat/extension/-/extension-0.0.13.tgz","fileCount":42,"integrity":"sha512-peCNUfQ70M9mVgSWhzrm3P7OFO68585QOPllwWtTgrGjhPdY2zGAM2NI23wm0vW+Mpr+901aEfu7KPSGsWZSYg==","signatures":[{"sig":"MEQCIG7sj5fbTuRIwMs9UfNh7t3NmHN88WlPJe+yevLnQe8sAiA5WK6x/NEfLC6JeLeZnZkUlMfNesywIYfYvcSwF34oUg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":164053},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"69444ce2c1f9ec009e20d15eed1cbb361f5064e0","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./keys":{"types":"./dist/keys.d.ts","import":"./dist/keys.js"},"./popup":{"types":"./dist/popup.d.ts","import":"./dist/popup.js"},"./storage":{"types":"./dist/storage.d.ts","import":"./dist/storage.js"}},"scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist"},"_npmUser":{"name":"dcasegr","email":"david.case@shruggr.cloud"},"_integrity":"sha512-peCNUfQ70M9mVgSWhzrm3P7OFO68585QOPllwWtTgrGjhPdY2zGAM2NI23wm0vW+Mpr+901aEfu7KPSGsWZSYg==","_npmVersion":"10.8.3","description":"Build browser wallet extensions that implement window.onesat","directories":{},"_nodeVersion":"24.3.0","dependencies":{"bitcoin-backup":"^0.0.11","webextension-polyfill":"^0.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@bsv/sdk":"^2.0.13","typescript":"^5.9.3","@types/chrome":"^0.0.287","@types/webextension-polyfill":"^0.12.4"},"peerDependencies":{"@bsv/sdk":"^2.0.13"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.0.13_1783986416498_0.08747045399652653","host":"s3://npm-registry-packages-npm-production"}},"0.0.14":{"name":"@1sat/extension","version":"0.0.14","keywords":["1sat","ordinals","bsv","bitcoin","wallet","extension","chrome"],"license":"MIT","_id":"@1sat/extension@0.0.14","maintainers":[{"name":"dcasegr","email":"david.case@shruggr.cloud"},{"name":"wildsatchmo","email":"rohenaz@gmail.com"}],"dist":{"shasum":"b72b8329795f51e9a97110770ace302baefabe78","tarball":"https://registry.npmjs.org/@1sat/extension/-/extension-0.0.14.tgz","fileCount":42,"integrity":"sha512-wrB9YHqilIW+1/jOyVWGjBHiEVgsGxY7PgqxGQda9wz978s5nYG46gtt01SsfmKpaIYuK9iMUGsCxrUkzx60fQ==","signatures":[{"sig":"MEUCIQDpfnBmjPEKIpPVWn1eS8EVmBrRdJny6t3LpQfFEiU6vQIgbyRTr2rL+lKs6EFXaN9+bZ123zC6SOZ4uCCZNhR4otM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":164051},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"b72b8329795f51e9a97110770ace302baefabe78","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./keys":{"types":"./dist/keys.d.ts","import":"./dist/keys.js"},"./popup":{"types":"./dist/popup.d.ts","import":"./dist/popup.js"},"./storage":{"types":"./dist/storage.d.ts","import":"./dist/storage.js"}},"scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist"},"_npmUser":{"name":"dcasegr","email":"david.case@shruggr.cloud"},"_integrity":"sha512-wrB9YHqilIW+1/jOyVWGjBHiEVgsGxY7PgqxGQda9wz978s5nYG46gtt01SsfmKpaIYuK9iMUGsCxrUkzx60fQ==","_npmVersion":"10.8.3","description":"Build browser wallet extensions that implement window.onesat","directories":{},"_nodeVersion":"24.3.0","dependencies":{"bitcoin-backup":"^0.0.11","webextension-polyfill":"^0.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@bsv/sdk":"^2.1.9","typescript":"^5.9.3","@types/chrome":"^0.0.287","@types/webextension-polyfill":"^0.12.4"},"peerDependencies":{"@bsv/sdk":"^2.1.9"},"_npmOperationalInternal":{"tmp":"tmp/extension_0.0.14_1784937563051_0.36133005563185283","host":"s3://npm-registry-packages-npm-production"}},"0.0.15":{"name":"@1sat/extension","version":"0.0.15","description":"Build browser wallet extensions that implement window.onesat","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./popup":{"types":"./dist/popup.d.ts","import":"./dist/popup.js"},"./storage":{"types":"./dist/storage.d.ts","import":"./dist/storage.js"},"./keys":{"types":"./dist/keys.d.ts","import":"./dist/keys.js"}},"scripts":{"build":"tsc","dev":"tsc --watch","clean":"rm -rf dist"},"dependencies":{"bitcoin-backup":"^0.0.11","webextension-polyfill":"^0.12.0"},"peerDependencies":{"@bsv/sdk":"^2.5.0"},"devDependencies":{"@bsv/sdk":"^2.5.0","@types/chrome":"^0.0.287","@types/webextension-polyfill":"^0.12.4","typescript":"^5.9.3"},"publishConfig":{"access":"public"},"keywords":["1sat","ordinals","bsv","bitcoin","wallet","extension","chrome"],"license":"MIT","_id":"@1sat/extension@0.0.15","_integrity":"sha512-f7SFi29QNkduQl1iI1mm2sJPfH4GZCwR+MjDvmHp/j4BDZFpHjMQdAclO3oB3byCcMU3W0e1uLm7a0eJlOf1aw==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"7286ca88c29c7d3fef10c8d0570bf3aeb3da1e20","dist":{"integrity":"sha512-f7SFi29QNkduQl1iI1mm2sJPfH4GZCwR+MjDvmHp/j4BDZFpHjMQdAclO3oB3byCcMU3W0e1uLm7a0eJlOf1aw==","shasum":"7286ca88c29c7d3fef10c8d0570bf3aeb3da1e20","tarball":"https://registry.npmjs.org/@1sat/extension/-/extension-0.0.15.tgz","fileCount":46,"unpackedSize":165399,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDCKHcyHsqw+w8lqoRDL9OEmNE84velmrmKpuSSE4XNbwIgDKlI08zHKCm2yh3DhC42g3cYSDlzlUNQGuDB/j5yc7k="}]},"_npmUser":{"name":"wildsatchmo","email":"rohenaz@gmail.com"},"directories":{},"maintainers":[{"name":"dcasegr","email":"david.case@shruggr.cloud"},{"name":"wildsatchmo","email":"rohenaz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/extension_0.0.15_1789149269548_0.937071131237375"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-15T23:52:48.410Z","modified":"2026-09-11T17:54:29.968Z","0.0.1":"2025-12-15T23:52:48.632Z","0.0.2":"2025-12-16T00:54:57.648Z","0.0.3":"2026-02-06T18:13:28.794Z","0.0.4":"2026-02-25T02:10:34.669Z","0.0.5":"2026-03-21T15:46:48.578Z","0.0.6":"2026-04-16T19:39:45.200Z","0.0.7":"2026-04-21T19:42:01.474Z","0.0.8":"2026-04-22T02:35:27.139Z","0.0.9":"2026-04-22T04:06:52.480Z","0.0.10":"2026-07-12T20:21:45.737Z","0.0.12":"2026-07-13T22:37:07.864Z","0.0.13":"2026-07-13T23:46:56.638Z","0.0.14":"2026-07-24T23:59:23.204Z","0.0.15":"2026-09-11T17:54:29.684Z"},"license":"MIT","keywords":["1sat","ordinals","bsv","bitcoin","wallet","extension","chrome"],"description":"Build browser wallet extensions that implement window.onesat","maintainers":[{"name":"dcasegr","email":"david.case@shruggr.cloud"},{"name":"wildsatchmo","email":"rohenaz@gmail.com"}],"readme":"# @1sat/extension\n\nBuild browser wallet extensions that implement `window.onesat`. This package provides the core primitives so you can focus on your wallet's UI and key management.\n\n## Installation\n\n```bash\nbun add @1sat/extension\n```\n\n## Quick Start\n\nCreate a wallet extension in 4 files:\n\n```\nmy-wallet/\n├── manifest.json\n├── src/\n│   ├── inject.ts      # Creates window.onesat\n│   ├── content.ts     # Bridges page ↔ background\n│   └── background.ts  # Handles requests\n└── popup/\n    └── index.html     # Your approval UI\n```\n\n### 1. Inject Script (inject.ts)\n\n```typescript\nimport { injectOneSatProvider } from '@1sat/extension'\n\n// Creates window.onesat with all OneSatProvider methods\ninjectOneSatProvider()\n```\n\nThat's it. The provider automatically routes all method calls through your content script to the background.\n\n### 2. Content Script (content.ts)\n\n```typescript\nimport { createContentBridge } from '@1sat/extension'\n\n// Bridges postMessage from page to chrome.runtime\ncreateContentBridge()\n```\n\n### 3. Background Script (background.ts)\n\n```typescript\nimport { createBackgroundHandler, openApprovalPopup } from '@1sat/extension'\n\ncreateBackgroundHandler({\n  // Called for every request - return true to auto-approve, false to show popup\n  shouldAutoApprove: (request) => {\n    // Auto-approve read-only methods\n    return ['getBalance', 'getOrdinals', 'getUtxos'].includes(request.method)\n  },\n\n  // Your wallet implementation\n  handlers: {\n    async connect(request, sender) {\n      // Show connection approval popup\n      const approved = await openApprovalPopup('/popup/connect.html', {\n        origin: sender.origin,\n        favIconUrl: sender.tab?.favIconUrl,\n      })\n\n      if (!approved) {\n        throw new Error('User rejected connection')\n      }\n\n      // Return your wallet's addresses\n      return {\n        paymentAddress: await getPaymentAddress(),\n        ordinalAddress: await getOrdinalAddress(),\n        identityPubKey: await getIdentityPubKey(),\n      }\n    },\n\n    async signMessage(request) {\n      const { message } = request.params\n\n      // Show signing approval\n      const approved = await openApprovalPopup('/popup/sign.html', { message })\n      if (!approved) throw new Error('User rejected')\n\n      // Sign with your wallet\n      return signBsm(message)\n    },\n\n    async signTransaction(request) {\n      const { rawtx, broadcast } = request.params\n\n      // Show transaction approval\n      const approved = await openApprovalPopup('/popup/transaction.html', { rawtx })\n      if (!approved) throw new Error('User rejected')\n\n      // Sign the transaction\n      const signed = await signTx(rawtx)\n\n      // Optionally broadcast\n      if (broadcast) {\n        await broadcastTx(signed)\n      }\n\n      return {\n        rawtx: signed.toHex(),\n        txid: signed.id('hex'),\n      }\n    },\n\n    async getBalance() {\n      // No approval needed - just return data\n      return { satoshis: await fetchBalance() }\n    },\n\n    // ... implement other methods\n  },\n})\n```\n\n### 4. Manifest (manifest.json)\n\n```json\n{\n  \"manifest_version\": 3,\n  \"name\": \"My Wallet\",\n  \"version\": \"1.0.0\",\n  \"permissions\": [\"storage\", \"activeTab\"],\n  \"host_permissions\": [\"<all_urls>\"],\n\n  \"background\": {\n    \"service_worker\": \"dist/background.js\",\n    \"type\": \"module\"\n  },\n\n  \"content_scripts\": [{\n    \"matches\": [\"<all_urls>\"],\n    \"js\": [\"dist/content.js\"],\n    \"run_at\": \"document_start\"\n  }],\n\n  \"web_accessible_resources\": [{\n    \"resources\": [\"dist/inject.js\"],\n    \"matches\": [\"<all_urls>\"]\n  }],\n\n  \"action\": {\n    \"default_popup\": \"popup/index.html\"\n  }\n}\n```\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│  Web Page                                                        │\n│  ┌─────────────────────────────────────────────────────────────┐│\n│  │ dApp code                                                    ││\n│  │ const onesat = window.onesat                                 ││\n│  │ await onesat.connect()                                       ││\n│  │ onesat.on('accountChange', handler)                          ││\n│  └──────────────────────────┬──────────────────────────────────┘│\n│                             │                          ▲         │\n│  ┌──────────────────────────▼──────────────────────────│────────┐│\n│  │ inject.ts (window.onesat)                           │        ││\n│  │ Requests → postMessage              Events ← listen │        ││\n│  └─────────────────────────────────────────────────────────────┘│\n└─────────────────────────────┬──────────────────────────▲────────┘\n                              │                          │\n                     Requests │                          │ Events\n                              ▼                          │\n┌─────────────────────────────────────────────────────────────────┐\n│  content.ts (Content Script)                                     │\n│  Bidirectional relay: page ↔ extension                           │\n└─────────────────────────────┬──────────────────────────▲────────┘\n                              │                          │\n          chrome.runtime.send │                          │ chrome.tabs.sendMessage\n                              ▼                          │\n┌─────────────────────────────────────────────────────────────────┐\n│  background.ts (Service Worker)                                  │\n│  ┌─────────────────────────────────────────────────────────────┐│\n│  │ handlers: { connect, sign, send, ... }                       ││\n│  │ broadcast('accountChange', data) → all connected tabs        ││\n│  └─────────────────────────────────────────────────────────────┘│\n│                             │                                    │\n│  ┌──────────────────────────▼──────────────────────────────────┐│\n│  │ Approval Popup (when needed)                                 ││\n│  │ Your React/HTML UI for user confirmation                     ││\n│  │ approveRequest() / rejectRequest()                           ││\n│  └─────────────────────────────────────────────────────────────┘│\n└─────────────────────────────────────────────────────────────────┘\n```\n\n**Request Flow:** dApp → inject → content → background → handler → popup → response\n**Event Flow:** background.broadcast() → content → inject → dApp event handlers\n\n## API Reference\n\n### injectOneSatProvider(options?)\n\nInjects `window.onesat` into the page. Call this from your inject script.\n\n```typescript\nimport { injectOneSatProvider } from '@1sat/extension'\n\ninjectOneSatProvider({\n  // Optional: Add custom properties to the provider\n  walletName: 'My Wallet',\n  walletVersion: '1.0.0',\n})\n```\n\nThe injected provider implements the full `OneSatProvider` interface:\n\n```typescript\ninterface OneSatProvider {\n  readonly isOneSat: true\n\n  // Connection\n  connect(): Promise<ConnectResult>\n  disconnect(): Promise<void>\n  isConnected(): boolean\n\n  // Signing\n  signTransaction(request: SignTransactionRequest): Promise<SignTransactionResult>\n  signMessage(message: string): Promise<SignMessageResult>\n\n  // Ordinals\n  inscribe(request: InscribeRequest): Promise<InscribeResult>\n  sendOrdinals(request: SendOrdinalsRequest): Promise<SendResult>\n\n  // Tokens\n  transferToken(request: TransferTokenRequest): Promise<SendResult>\n\n  // Listings (optional)\n  createListing(request: CreateListingRequest): Promise<ListingResult>\n  purchaseListing(request: PurchaseListingRequest): Promise<SendResult>\n  cancelListing(request: CancelListingRequest): Promise<SendResult>\n\n  // Read-only\n  getBalance(): Promise<BalanceResult>\n  getOrdinals(options?: ListOptions): Promise<OrdinalOutput[]>\n  getTokens(options?: ListOptions): Promise<TokenOutput[]>\n  getUtxos(): Promise<Utxo[]>\n\n  // Events\n  on(event: OneSatEvent, handler: EventHandler): void\n  off(event: OneSatEvent, handler: EventHandler): void\n\n  // Utility\n  getAddresses(): { paymentAddress: string; ordinalAddress: string } | null\n  getIdentityPubKey(): string | null\n}\n```\n\n### createContentBridge(options?)\n\nCreates the content script bridge. Handles all message routing automatically.\n\n```typescript\nimport { createContentBridge } from '@1sat/extension'\n\ncreateContentBridge({\n  // Optional: Filter which origins can communicate\n  allowedOrigins: ['https://1sat.market', 'https://myapp.com'],\n\n  // Optional: Log messages for debugging\n  debug: process.env.NODE_ENV === 'development',\n})\n```\n\n### createBackgroundHandler(config)\n\nSets up the background service worker to handle requests. Returns a `broadcast` function for emitting events to connected pages.\n\n```typescript\nimport { createBackgroundHandler } from '@1sat/extension'\n\nconst { broadcast } = createBackgroundHandler({\n  // Determine if request needs user approval\n  shouldAutoApprove: (request) => boolean,\n\n  // Your method implementations\n  handlers: {\n    connect: async (request, sender) => ConnectResult,\n    disconnect: async (request, sender) => void,\n    signTransaction: async (request, sender) => SignTransactionResult,\n    signMessage: async (request, sender) => SignMessageResult,\n    inscribe: async (request, sender) => InscribeResult,\n    sendOrdinals: async (request, sender) => SendResult,\n    transferToken: async (request, sender) => SendResult,\n    createListing: async (request, sender) => ListingResult,\n    purchaseListing: async (request, sender) => SendResult,\n    cancelListing: async (request, sender) => SendResult,\n    getBalance: async (request, sender) => BalanceResult,\n    getOrdinals: async (request, sender) => OrdinalOutput[],\n    getTokens: async (request, sender) => TokenOutput[],\n    getUtxos: async (request, sender) => Utxo[],\n  },\n\n  // Handle events (optional)\n  onConnect: (tabId, origin) => void,\n  onDisconnect: (tabId, origin) => void,\n})\n\n// Later, when user switches account in your UI:\nbroadcast('accountChange', {\n  paymentAddress: newPaymentAddress,\n  ordinalAddress: newOrdinalAddress\n})\n```\n\n### openApprovalPopup(path, data?)\n\nOpens a popup window for user approval. Returns a promise that resolves when the user responds.\n\n```typescript\nimport { openApprovalPopup } from '@1sat/extension'\n\n// In your handler\nasync signMessage(request) {\n  const approved = await openApprovalPopup('/popup/sign.html', {\n    message: request.params.message,\n    origin: request.origin,\n  })\n\n  if (!approved) {\n    throw new UserRejectedError()\n  }\n\n  return sign(request.params.message)\n}\n```\n\nIn your popup HTML/React:\n\n```typescript\nimport { getApprovalData, approveRequest, rejectRequest } from '@1sat/extension/popup'\n\n// Get the data passed to the popup\nconst data = await getApprovalData()\nconsole.log(data.message, data.origin)\n\n// User clicks approve\ndocument.getElementById('approve').onclick = () => approveRequest()\n\n// User clicks reject\ndocument.getElementById('reject').onclick = () => rejectRequest()\n```\n\n### Storage Helpers\n\nUtilities for managing connected sites and wallet state. Uses `chrome.storage.local` for persistence across service worker restarts.\n\n```typescript\nimport {\n  ConnectedSites,\n  WalletState,\n} from '@1sat/extension/storage'\n\n// Manage connected sites - persisted across sessions\nawait ConnectedSites.add(origin, { permissions: ['sign'] })\nawait ConnectedSites.remove(origin)\nawait ConnectedSites.isConnected(origin)  // Check before auto-approving\nawait ConnectedSites.getAll()\n\n// Wallet state (you manage the actual keys)\nawait WalletState.setAddresses({ paymentAddress, ordinalAddress })\nawait WalletState.getAddresses()\nawait WalletState.clear()\n```\n\n### Session Persistence\n\nConnected sites are automatically persisted. Use this in your handlers:\n\n```typescript\nasync connect(request, sender) {\n  const origin = sender.origin!\n\n  // Check if already connected\n  if (await ConnectedSites.isConnected(origin)) {\n    // Return cached addresses without showing popup\n    return WalletState.getAddresses()\n  }\n\n  // Show approval popup for new connections\n  const approved = await openApprovalPopup('/popup/connect.html', { origin })\n  if (!approved) throw new UserRejectedError()\n\n  // Save connection\n  await ConnectedSites.add(origin, { permissions: ['sign', 'inscribe'] })\n\n  return {\n    paymentAddress: await getPaymentAddress(),\n    ordinalAddress: await getOrdinalAddress(),\n    identityPubKey: await getIdentityPubKey(),\n  }\n}\n\nasync disconnect(request, sender) {\n  await ConnectedSites.remove(sender.origin!)\n  broadcast('disconnect', {})\n}\n```\n\n## Manifest V3 Service Worker Handling\n\nChrome's Manifest V3 terminates service workers after 30 seconds of inactivity. This package handles this automatically:\n\n1. **Pending requests are persisted** to `chrome.storage.session`\n2. **When popup responds**, the service worker wakes and retrieves the pending request\n3. **Responses are delivered** even if the original service worker context died\n\n```typescript\n// This \"just works\" - you don't need to handle it manually\nconst approved = await openApprovalPopup('/popup/sign.html', { message })\n// Even if popup is open for 5 minutes, this resolves correctly\n```\n\nFor long-running operations in your handlers, use the keep-alive helper:\n\n```typescript\nimport { keepAlive } from '@1sat/extension'\n\nasync signTransaction(request) {\n  // Prevents service worker termination during this operation\n  return keepAlive(async () => {\n    const approved = await openApprovalPopup('/popup/sign.html')\n    if (!approved) throw new Error('Rejected')\n    return await signTx(request.params.rawtx)\n  })\n}\n```\n\n## Events\n\nThe provider emits events that dApps can listen to. Your background script should emit these at appropriate times using the `broadcast()` function.\n\n### Provider Events\n\n| Event | When to Emit | Data |\n|-------|-------------|------|\n| `connect` | After user approves connection | `{ paymentAddress, ordinalAddress, identityPubKey }` |\n| `disconnect` | After disconnect() or user revokes in wallet UI | `{}` |\n| `accountChange` | When user switches account in wallet UI | `{ paymentAddress, ordinalAddress }` |\n\n### Emitting Events\n\n```typescript\nconst { broadcast } = createBackgroundHandler({\n  handlers: {\n    async connect(request, sender) {\n      // ... approval logic ...\n      const result = { paymentAddress, ordinalAddress, identityPubKey }\n\n      // Event is emitted automatically on successful connect\n      return result\n    },\n  },\n})\n\n// When user switches account in your wallet UI:\nbroadcast('accountChange', {\n  paymentAddress: newPaymentAddress,\n  ordinalAddress: newOrdinalAddress,\n})\n\n// When user disconnects via your wallet UI:\nbroadcast('disconnect', {})\n```\n\n### Detecting Provider Ready\n\nThe inject script dispatches a `onesat:ready` event after initial state sync:\n\n```typescript\n// In your dApp\nif (window.onesat) {\n  // Provider already available\n  startApp()\n} else {\n  // Wait for provider\n  window.addEventListener('onesat:ready', startApp)\n}\n\nfunction startApp() {\n  // Safe to use window.onesat\n  const connected = window.onesat.isConnected()\n  const addresses = window.onesat.getAddresses()\n}\n```\n\n## Error Handling\n\nThe package uses standardized error codes compatible with JSON-RPC:\n\n```typescript\nimport {\n  UserRejectedError,     // 4001 - User rejected the request\n  UnauthorizedError,     // 4100 - Not connected to this origin\n  UnsupportedMethodError, // 4200 - Method not implemented\n  DisconnectedError,     // 4900 - Wallet is disconnected\n} from '@1sat/extension'\n\n// In your handlers\nasync signMessage(request, sender) {\n  if (!await ConnectedSites.isConnected(sender.origin!)) {\n    throw new UnauthorizedError('Please connect first')\n  }\n\n  const approved = await openApprovalPopup('/popup/sign.html')\n  if (!approved) {\n    throw new UserRejectedError()  // Sends { code: 4001, message: 'User rejected' }\n  }\n\n  return sign(request.params.message)\n}\n\n// Methods you haven't implemented\nasync createListing() {\n  throw new UnsupportedMethodError('Listings not supported')\n}\n```\n\nErrors are automatically serialized and sent back to the dApp:\n\n```typescript\n// In the dApp\ntry {\n  await onesat.signMessage('hello')\n} catch (err) {\n  if (err.code === 4001) {\n    console.log('User rejected')\n  }\n}\n```\n\n## Building Your Extension\n\n### With Bun\n\n```bash\n# Bundle all entry points\nbun build src/inject.ts --outdir dist\nbun build src/content.ts --outdir dist\nbun build src/background.ts --outdir dist\n\n# Or use a build script\nbun run build\n```\n\n### With Vite\n\n```typescript\n// vite.config.ts\nimport { defineConfig } from 'vite'\nimport { crx } from '@crxjs/vite-plugin'\nimport manifest from './manifest.json'\n\nexport default defineConfig({\n  plugins: [crx({ manifest })],\n})\n```\n\n### Load in Chrome\n\n1. Go to `chrome://extensions`\n2. Enable \"Developer mode\"\n3. Click \"Load unpacked\"\n4. Select your extension directory\n\n## Example: Minimal Wallet\n\nSee [`examples/minimal-wallet`](../../examples/minimal-wallet) for a complete working example with:\n\n- Single-key wallet (auto-generated)\n- Connect and sign message approval popups\n- Balance display via WhatsOnChain API\n- Connected sites management UI\n- Test page for integration testing\n\nHere's a simplified version:\n\n```typescript\n// background.ts\nimport { createBackgroundHandler, openApprovalPopup } from '@1sat/extension'\nimport { PrivateKey } from '@bsv/sdk'\n\nlet privateKey: PrivateKey | null = null\n\ncreateBackgroundHandler({\n  shouldAutoApprove: (req) => ['getBalance', 'getAddresses'].includes(req.method),\n\n  handlers: {\n    async connect(request, sender) {\n      if (!privateKey) {\n        // First time - generate or import key\n        const approved = await openApprovalPopup('/popup/setup.html')\n        if (!approved) throw new Error('Setup cancelled')\n        privateKey = PrivateKey.fromRandom()\n      }\n\n      const address = privateKey.toAddress().toString()\n      return {\n        paymentAddress: address,\n        ordinalAddress: address,\n        identityPubKey: privateKey.toPublicKey().toString(),\n      }\n    },\n\n    async signMessage(request) {\n      if (!privateKey) throw new Error('Not connected')\n\n      const approved = await openApprovalPopup('/popup/sign.html', {\n        message: request.params.message,\n      })\n      if (!approved) throw new Error('Rejected')\n\n      const sig = privateKey.sign(request.params.message)\n      return {\n        message: request.params.message,\n        signature: sig.toString(),\n        address: privateKey.toAddress().toString(),\n      }\n    },\n\n    async getBalance() {\n      // Fetch from indexer\n      const address = privateKey?.toAddress().toString()\n      const res = await fetch(`https://api.whatsonchain.com/v1/bsv/main/address/${address}/balance`)\n      const data = await res.json()\n      return { satoshis: data.confirmed + data.unconfirmed }\n    },\n\n    // ... other handlers\n  },\n})\n```\n\n## Testing\n\nTest your extension with any dApp using the 1sat SDK:\n\n```typescript\n// In a dApp\nimport { createOneSat } from '@1sat/connect'\n\nconst onesat = createOneSat({ appName: 'Test App' })\n\n// If your extension is installed, this uses it\n// Otherwise falls back to popup wallet\nconst { paymentAddress } = await onesat.connect()\nconsole.log('Connected:', paymentAddress)\n```\n\n## TypeScript\n\nFull TypeScript support included. Import types as needed:\n\n```typescript\nimport type {\n  OneSatProvider,\n  ConnectResult,\n  SignTransactionRequest,\n  SignTransactionResult,\n  SignMessageResult,\n  InscribeRequest,\n  InscribeResult,\n  SendOrdinalsRequest,\n  SendResult,\n  BalanceResult,\n  OrdinalOutput,\n  TokenOutput,\n  Utxo,\n  OneSatEvent,\n  ExtensionRequest,\n  ExtensionResponse,\n} from '@1sat/extension'\n```\n\n## Related\n\n- [@1sat/connect](../connect) - Popup wallet connection\n- [@1sat/templates](../templates) - Transaction building and protocol implementations\n- [@1sat/client](../client) - API clients for indexer and broadcast\n- [1sat.market](https://1sat.market) - Reference wallet implementation\n\n## License\n\nMIT\n","readmeFilename":"README.md"}