{"_id":"@cocowallet/miniapp-sdk","_rev":"15-b89a68ccaef188c18ffe70e298dddc29","name":"@cocowallet/miniapp-sdk","dist-tags":{"beta":"0.6.1","latest":"0.14.0"},"versions":{"0.1.0":{"name":"@cocowallet/miniapp-sdk","version":"0.1.0","keywords":["coco-wallet","miniapp","sdk","wallet","ethereum","base","erc-4337","smart-account"],"license":"MIT","_id":"@cocowallet/miniapp-sdk@0.1.0","maintainers":[{"name":"cocovickcharles","email":"vickler@cocowallet.app"}],"homepage":"https://github.com/coco-mercado/coco-wallet/tree/masterV3/packages/miniapp-sdk#readme","bugs":{"url":"https://github.com/coco-mercado/coco-wallet/issues"},"dist":{"shasum":"adee14afe73998a32899bd0812ee08ae2685d2eb","tarball":"https://registry.npmjs.org/@cocowallet/miniapp-sdk/-/miniapp-sdk-0.1.0.tgz","fileCount":5,"integrity":"sha512-nk5prUjoM1HtFOaFNz7+p7exWqgG7yw6Jy93rIxcndVYiPGrn+WXyGn7B4GuktRJ6xUZP/vcb76Cr3cd3yG3ZQ==","signatures":[{"sig":"MEQCIH/E4VskEyBO8y+8YyR/0DTeNhXelksBRUUudURM4Z2jAiBUvF7HtGYEPPO6HLWslh3l/vhcvbA+rVmqFhDvt9DO7Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14652},"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"}},"gitHead":"7acb5d824f41b45c003cc876b6b0c4ff48ef6606","scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"cocovickcharles","email":"vickler@cocowallet.app"},"repository":{"url":"git+https://github.com/coco-mercado/coco-wallet.git","type":"git","directory":"packages/miniapp-sdk"},"_npmVersion":"10.9.2","description":"JavaScript SDK for Coco Wallet mini apps. Exposes the user's smart account and transaction signing to web apps embedded in Coco's WebView.","directories":{},"_nodeVersion":"23.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/miniapp-sdk_0.1.0_1778250847010_0.16166520006512397","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@cocowallet/miniapp-sdk","version":"0.2.0","keywords":["coco-wallet","miniapp","sdk","wallet","ethereum","base","erc-4337","smart-account"],"license":"MIT","_id":"@cocowallet/miniapp-sdk@0.2.0","maintainers":[{"name":"cocovickcharles","email":"vickler@cocowallet.app"}],"homepage":"https://github.com/coco-mercado/coco-wallet/tree/masterV3/packages/miniapp-sdk#readme","bugs":{"url":"https://github.com/coco-mercado/coco-wallet/issues"},"dist":{"shasum":"787c32b56274a5a7a6154c56455fe2615190b2b7","tarball":"https://registry.npmjs.org/@cocowallet/miniapp-sdk/-/miniapp-sdk-0.2.0.tgz","fileCount":5,"integrity":"sha512-+XisP9FXSogXidD00coda29bx3NoLlp3h37GGxBR+6Nbq18gLv5axzONWo8DTcKDNgcILi1A0QMJUZU8bvcT9w==","signatures":[{"sig":"MEYCIQCZaXWKwYix/H5Cb0vBWhFKVSrT+Nx+nrVCAZZzoxbmkAIhALid5Ydys0Q7vCu2Kcq9xT8QbPszBu7cBTXfUQ7Ejw+O","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23895},"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"}},"gitHead":"e39e509caac33df16cfd2e403d3704970657946a","scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"cocovickcharles","email":"vickler@cocowallet.app"},"repository":{"url":"git+https://github.com/coco-mercado/coco-wallet.git","type":"git","directory":"packages/miniapp-sdk"},"_npmVersion":"10.9.2","description":"JavaScript SDK for Coco Wallet mini apps. Exposes the user's smart account and transaction signing to web apps embedded in Coco's WebView.","directories":{},"_nodeVersion":"23.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/miniapp-sdk_0.2.0_1782327476649_0.896547929377632","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@cocowallet/miniapp-sdk","version":"0.3.0","keywords":["coco-wallet","miniapp","sdk","wallet","ethereum","base","erc-4337","smart-account"],"license":"MIT","_id":"@cocowallet/miniapp-sdk@0.3.0","maintainers":[{"name":"cocovickcharles","email":"vickler@cocowallet.app"}],"homepage":"https://github.com/coco-mercado/coco-wallet/tree/masterV3/packages/miniapp-sdk#readme","bugs":{"url":"https://github.com/coco-mercado/coco-wallet/issues"},"dist":{"shasum":"b6d7b2e01f31e2ab04ae965ba09bced27c511bc4","tarball":"https://registry.npmjs.org/@cocowallet/miniapp-sdk/-/miniapp-sdk-0.3.0.tgz","fileCount":5,"integrity":"sha512-0ZcF3V1xDoVxITgs6u4LPcR4UiFHGo/2z6Qjn2Ga7nKvexFs8+crP8GVvPHtxOBALQZgyP3h2BbpIKNlGTaJDw==","signatures":[{"sig":"MEMCIDjEJCaUhrVMyWYK0GRgDjmC+NXU73o9VfOe0okpBVqaAh8anyTpE34Ge7xJl0Qw4wFaNTFhdPcvfRsekraGg0Jv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26055},"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"}},"gitHead":"e39e509caac33df16cfd2e403d3704970657946a","scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"cocovickcharles","email":"vickler@cocowallet.app"},"repository":{"url":"git+https://github.com/coco-mercado/coco-wallet.git","type":"git","directory":"packages/miniapp-sdk"},"_npmVersion":"10.9.2","description":"JavaScript SDK for Coco Wallet mini apps. Exposes the user's smart account and transaction signing to web apps embedded in Coco's WebView.","directories":{},"_nodeVersion":"23.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/miniapp-sdk_0.3.0_1782327741200_0.38579845399839474","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@cocowallet/miniapp-sdk","version":"0.3.1","keywords":["coco-wallet","miniapp","sdk","wallet","ethereum","polygon","erc-4337","smart-account"],"license":"MIT","_id":"@cocowallet/miniapp-sdk@0.3.1","maintainers":[{"name":"cocovickcharles","email":"vickler@cocowallet.app"}],"homepage":"https://github.com/coco-mercado/coco-wallet/tree/masterV3/packages/miniapp-sdk#readme","bugs":{"url":"https://github.com/coco-mercado/coco-wallet/issues"},"dist":{"shasum":"90937f13ca12c1da222ce798bfdbc5b86f518a7d","tarball":"https://registry.npmjs.org/@cocowallet/miniapp-sdk/-/miniapp-sdk-0.3.1.tgz","fileCount":5,"integrity":"sha512-uFPEDSxGA2UhY2Dy5StdaY6imqTaLcdDJvh91R2Qvs3L5MgTp31ImXO52+uGmBamAW0s1Vwn/vC9Tv1OG/YChw==","signatures":[{"sig":"MEYCIQDf21sfruxNo2Nd901Iqa6EaRo5TVR01P2TfIQHGBShuAIhALujS9B1MM7o2ID3BXxLPPludIV4eINOZsWT0VqEYJbm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25735},"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"}},"scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"cocovickcharles","email":"vickler@cocowallet.app"},"repository":{"url":"git+https://github.com/coco-mercado/coco-wallet.git","type":"git","directory":"packages/miniapp-sdk"},"_npmVersion":"10.9.2","description":"JavaScript SDK for Coco Wallet mini apps. Exposes the user's smart account and transaction signing to web apps embedded in Coco's WebView.","directories":{},"_nodeVersion":"23.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/miniapp-sdk_0.3.1_1783424844328_0.04299147370963485","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@cocowallet/miniapp-sdk","version":"0.4.0","keywords":["coco-wallet","miniapp","sdk","wallet","ethereum","polygon","erc-4337","smart-account"],"license":"MIT","_id":"@cocowallet/miniapp-sdk@0.4.0","maintainers":[{"name":"cocovickcharles","email":"vickler@cocowallet.app"}],"homepage":"https://github.com/coco-mercado/coco-wallet/tree/masterV3/packages/miniapp-sdk#readme","bugs":{"url":"https://github.com/coco-mercado/coco-wallet/issues"},"dist":{"shasum":"56c6567b0da377efe6f9fc497ba983daa5b90297","tarball":"https://registry.npmjs.org/@cocowallet/miniapp-sdk/-/miniapp-sdk-0.4.0.tgz","fileCount":5,"integrity":"sha512-z85dmz6IG7WLSpKia4uc0Pku3LS/NQgsKEnUF4blAbDqSinGrmEMvxjuFwoApHaxYfDArLPszf28HV30Y0EVXw==","signatures":[{"sig":"MEYCIQC3nxC15T7caPt9BWd3RlWx6Eha80uew9l8m+K3/ABV6QIhAI428UU+S1CHFh1rPFqR6AE4UPrJAPKocEoM5Erdcvxu","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34539},"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"}},"gitHead":"da88cf6ba2e54b9360f016721983d551a0b9fc1a","scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"cocovickcharles","email":"vickler@cocowallet.app"},"repository":{"url":"git+https://github.com/coco-mercado/coco-wallet.git","type":"git","directory":"packages/miniapp-sdk"},"_npmVersion":"10.9.2","description":"JavaScript SDK for Coco Wallet mini apps. Exposes the user's smart account and transaction signing to web apps embedded in Coco's WebView.","directories":{},"_nodeVersion":"23.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/miniapp-sdk_0.4.0_1784222361470_0.9211845336783699","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@cocowallet/miniapp-sdk","version":"0.4.1","keywords":["coco-wallet","miniapp","sdk","wallet","ethereum","polygon","erc-4337","smart-account"],"license":"MIT","_id":"@cocowallet/miniapp-sdk@0.4.1","maintainers":[{"name":"cocovickcharles","email":"vickler@cocowallet.app"}],"homepage":"https://github.com/coco-mercado/coco-wallet/tree/masterV3/packages/miniapp-sdk#readme","bugs":{"url":"https://github.com/coco-mercado/coco-wallet/issues"},"dist":{"shasum":"7b3bba01d7a7da9fb7cfe02c5f70fa3cdb895fbb","tarball":"https://registry.npmjs.org/@cocowallet/miniapp-sdk/-/miniapp-sdk-0.4.1.tgz","fileCount":5,"integrity":"sha512-NgQmF4DPy5Oe0boPYqh3rrLXrk25F1jZ+Ix3gYxpeMHOejefLbivaliL7Da8e560q6dlYqUj3Qawo3GRktal3A==","signatures":[{"sig":"MEQCIHTf//oCqzBofDfTFVWnlpZLLXfU9vyU6tkowfUxqdsFAiAqRu4HEuvWyNpiJ4ICg7zS4xZZoMm+IqidYiNjZBnBTA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36540},"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"}},"gitHead":"da88cf6ba2e54b9360f016721983d551a0b9fc1a","scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"cocovickcharles","email":"vickler@cocowallet.app"},"repository":{"url":"git+https://github.com/coco-mercado/coco-wallet.git","type":"git","directory":"packages/miniapp-sdk"},"_npmVersion":"10.9.2","description":"JavaScript SDK for Coco Wallet mini apps. Exposes the user's smart account and transaction signing to web apps embedded in Coco's WebView.","directories":{},"_nodeVersion":"23.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/miniapp-sdk_0.4.1_1784229474875_0.7740022771221207","host":"s3://npm-registry-packages-npm-production"}},"0.4.2":{"name":"@cocowallet/miniapp-sdk","version":"0.4.2","keywords":["coco-wallet","miniapp","sdk","wallet","ethereum","polygon","erc-4337","smart-account"],"license":"MIT","_id":"@cocowallet/miniapp-sdk@0.4.2","maintainers":[{"name":"cocovickcharles","email":"vickler@cocowallet.app"}],"homepage":"https://github.com/coco-mercado/coco-wallet/tree/masterV3/packages/miniapp-sdk#readme","bugs":{"url":"https://github.com/coco-mercado/coco-wallet/issues"},"dist":{"shasum":"48b4352283d14ee182e62b3fbd359ea4fc32a3f5","tarball":"https://registry.npmjs.org/@cocowallet/miniapp-sdk/-/miniapp-sdk-0.4.2.tgz","fileCount":5,"integrity":"sha512-6t1K5l+esR3NvrNWdiHjwZ1b2Jfx/XNkjgmZU5LwJeY3KZ3Uxw6O6gKDqsKLqJCu/0qFAGVRD18C7aDRLVCjpQ==","signatures":[{"sig":"MEUCIQDcUSkaJHvdxI3wLyFo7EnblkSSMLWOev/XPoRvkcwB7AIgSljfrD0swAXWhDQfquFKciGeC96zRu/+WUAUaTKz6so=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38253},"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"}},"gitHead":"fb63c06849dda5ed74ebeaf4f1c9233753899a80","scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"cocovickcharles","email":"vickler@cocowallet.app"},"repository":{"url":"git+https://github.com/coco-mercado/coco-wallet.git","type":"git","directory":"packages/miniapp-sdk"},"_npmVersion":"10.9.2","description":"JavaScript SDK for Coco Wallet mini apps. Exposes the user's smart account and transaction signing to web apps embedded in Coco's WebView.","directories":{},"_nodeVersion":"23.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/miniapp-sdk_0.4.2_1784283535395_0.1757773164009322","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@cocowallet/miniapp-sdk","version":"0.6.0","keywords":["coco-wallet","miniapp","sdk","wallet","ethereum","polygon","erc-4337","smart-account"],"license":"MIT","_id":"@cocowallet/miniapp-sdk@0.6.0","maintainers":[{"name":"cocovickcharles","email":"vickler@cocowallet.app"}],"homepage":"https://github.com/coco-mercado/coco-wallet/tree/masterV3/packages/miniapp-sdk#readme","bugs":{"url":"https://github.com/coco-mercado/coco-wallet/issues"},"dist":{"shasum":"395584fa1a49fa8b05acb2ccf338d12b9a65589e","tarball":"https://registry.npmjs.org/@cocowallet/miniapp-sdk/-/miniapp-sdk-0.6.0.tgz","fileCount":5,"integrity":"sha512-EG48eK9G/HhJt44Ukc/7FgdG2HQxVCDKA/eYDm76EqLZ/nr/arp3PpTWCuN9HWJYT9z/QUhWmyX6BgfFSBe5mQ==","signatures":[{"sig":"MEYCIQDzaw5M6SjNj8lddzHz9hDIpbzgJBzjLfMPCO3kKnDzPwIhAJomI2GQJ+xW+hLcLcEbEAN41kOj7tWgSxw8RkcujwlW","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59380},"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"}},"gitHead":"f71ab6d192f06f8d57f0e598ce25d79a1542307f","scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"cocovickcharles","email":"vickler@cocowallet.app"},"repository":{"url":"git+https://github.com/coco-mercado/coco-wallet.git","type":"git","directory":"packages/miniapp-sdk"},"_npmVersion":"10.9.2","description":"JavaScript SDK for Coco Wallet mini apps. Exposes the user's smart account and transaction signing to web apps embedded in Coco's WebView.","directories":{},"_nodeVersion":"23.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"typescript":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/miniapp-sdk_0.6.0_1785575124170_0.8901044782825998","host":"s3://npm-registry-packages-npm-production"}},"0.6.1":{"name":"@cocowallet/miniapp-sdk","version":"0.6.1","keywords":["coco-wallet","miniapp","sdk","wallet","ethereum","polygon","erc-4337","smart-account"],"license":"MIT","_id":"@cocowallet/miniapp-sdk@0.6.1","maintainers":[{"name":"cocovickcharles","email":"vickler@cocowallet.app"}],"homepage":"https://github.com/coco-mercado/coco-wallet/tree/masterV3/packages/miniapp-sdk#readme","bugs":{"url":"https://github.com/coco-mercado/coco-wallet/issues"},"dist":{"shasum":"afc8789ad82b9248da27efe39fd6a08a0b6e94b7","tarball":"https://registry.npmjs.org/@cocowallet/miniapp-sdk/-/miniapp-sdk-0.6.1.tgz","fileCount":5,"integrity":"sha512-hOaGJqJlFh9IInwcaGo0RepIt+uDzMf81GJu9PudtL/DML1TCKJqQnyCgXfgwpHOQOQw313TDZXzSpwH1sWLUQ==","signatures":[{"sig":"MEQCICr87vpZkeq1ZbqSi9+iyj1uvWokgObmVLZLUZ5ExfJFAiBifizIFvVUtuVbKXydixgutM8OsH0TPZs9MKYNA62vTg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63567},"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"}},"gitHead":"f8b45d72cae682d00a61fef97ace0354b07844d5","scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"cocovickcharles","email":"vickler@cocowallet.app"},"repository":{"url":"git+https://github.com/coco-mercado/coco-wallet.git","type":"git","directory":"packages/miniapp-sdk"},"_npmVersion":"10.9.2","description":"JavaScript SDK for Coco Wallet mini apps. Exposes the user's smart account and transaction signing to web apps embedded in Coco's WebView.","directories":{},"_nodeVersion":"23.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"typescript":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/miniapp-sdk_0.6.1_1786435290339_0.07064094220635009","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@cocowallet/miniapp-sdk","version":"0.7.0","keywords":["coco-wallet","miniapp","sdk","wallet","ethereum","polygon","erc-4337","smart-account"],"license":"MIT","_id":"@cocowallet/miniapp-sdk@0.7.0","maintainers":[{"name":"cocovickcharles","email":"vickler@cocowallet.app"}],"homepage":"https://github.com/coco-mercado/coco-wallet/tree/masterV3/packages/miniapp-sdk#readme","bugs":{"url":"https://github.com/coco-mercado/coco-wallet/issues"},"dist":{"shasum":"f2208435517811937fb73e960a79e6500e879580","tarball":"https://registry.npmjs.org/@cocowallet/miniapp-sdk/-/miniapp-sdk-0.7.0.tgz","fileCount":5,"integrity":"sha512-UWAHnK0ESyUWOPskJB7inRCLrnJbfH7xJXzUeZt19tZXa/gziXz0i424Q2vkoWngouLOLfK8jdCy81jANsvMTw==","signatures":[{"sig":"MEUCIQC/q1mqH9gzFJl9//Ke3d6hbZ6QXXX1BCnJ6JuOcMs08AIgSH84eghKSpoepaFT43/0s0R9/kCYioXaH/RS/2h5PCc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68623},"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"}},"gitHead":"3c4f9308ece1df8afbb1a0a74a8bd72b872d53e3","scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"cocovickcharles","email":"vickler@cocowallet.app"},"repository":{"url":"git+https://github.com/coco-mercado/coco-wallet.git","type":"git","directory":"packages/miniapp-sdk"},"_npmVersion":"10.9.2","description":"JavaScript SDK for Coco Wallet mini apps. Exposes the user's smart account and transaction signing to web apps embedded in Coco's WebView.","directories":{},"_nodeVersion":"23.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/miniapp-sdk_0.7.0_1787238299905_0.15164910206310322","host":"s3://npm-registry-packages-npm-production"}},"0.8.0":{"name":"@cocowallet/miniapp-sdk","version":"0.8.0","keywords":["coco-wallet","miniapp","sdk","wallet","ethereum","polygon","erc-4337","smart-account"],"license":"MIT","_id":"@cocowallet/miniapp-sdk@0.8.0","maintainers":[{"name":"cocovickcharles","email":"vickler@cocowallet.app"}],"homepage":"https://github.com/coco-mercado/coco-wallet/tree/masterV3/packages/miniapp-sdk#readme","bugs":{"url":"https://github.com/coco-mercado/coco-wallet/issues"},"dist":{"shasum":"9d491c0e8fa0496625beb5538c7754c5b36af0a3","tarball":"https://registry.npmjs.org/@cocowallet/miniapp-sdk/-/miniapp-sdk-0.8.0.tgz","fileCount":5,"integrity":"sha512-1zbbXPOtSlKCeqCH5STns/4GbHSDZpizLIxjy68BdPJ2N+FwD83uebqwvR+BEk6LHn6exKZuXVn6oD1uI3wFHA==","signatures":[{"sig":"MEYCIQDQcyzUV3R5k9CdpOQWfYkoUC1LvkzXAuc8b/+Bc/pmegIhAKXGXgcxdvAFOzVKjX5LWTjYmo0eXsgm20jaL+sUoYV8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73062},"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"}},"scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"cocovickcharles","email":"vickler@cocowallet.app"},"repository":{"url":"git+https://github.com/coco-mercado/coco-wallet.git","type":"git","directory":"packages/miniapp-sdk"},"_npmVersion":"10.9.2","description":"JavaScript SDK for Coco Wallet mini apps. Exposes the user's smart account and transaction signing to web apps embedded in Coco's WebView.","directories":{},"_nodeVersion":"23.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/miniapp-sdk_0.8.0_1788950005535_0.26412348549082676","host":"s3://npm-registry-packages-npm-production"}},"0.9.0":{"name":"@cocowallet/miniapp-sdk","version":"0.9.0","keywords":["coco-wallet","miniapp","sdk","wallet","ethereum","polygon","erc-4337","smart-account"],"license":"MIT","_id":"@cocowallet/miniapp-sdk@0.9.0","maintainers":[{"name":"cocovickcharles","email":"vickler@cocowallet.app"}],"homepage":"https://github.com/coco-mercado/coco-wallet/tree/masterV3/packages/miniapp-sdk#readme","bugs":{"url":"https://github.com/coco-mercado/coco-wallet/issues"},"dist":{"shasum":"6d10ddd533f26d0ece7d143f7de6656955562a5b","tarball":"https://registry.npmjs.org/@cocowallet/miniapp-sdk/-/miniapp-sdk-0.9.0.tgz","fileCount":5,"integrity":"sha512-NJ1Pj3WD8RkpGxtPkYY3lzlPcK4m5esxXyEyWXFvugfzp7PovOjYbW8psgK9GM1HCBYi2d11qTNivJUFo08+2g==","signatures":[{"sig":"MEUCIECO/uFrRlydHIar4X1IZXBU9QtGhM/rN3ejmUcv41sEAiEAy34Rtd1XbJIXjonYQpc9FpVya3/bZPODoQkXzPMIElg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":89441},"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"}},"scripts":{"build":"tsc -p tsconfig.build.json","sync-sdk":"node scripts/sync-vendored.mjs","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"cocovickcharles","email":"vickler@cocowallet.app"},"repository":{"url":"git+https://github.com/coco-mercado/coco-wallet.git","type":"git","directory":"packages/miniapp-sdk"},"_npmVersion":"10.9.2","description":"JavaScript SDK for Coco Wallet mini apps. Exposes the user's smart account and transaction signing to web apps embedded in Coco's WebView.","directories":{},"_nodeVersion":"23.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/miniapp-sdk_0.9.0_1789664461830_0.9325822606344492","host":"s3://npm-registry-packages-npm-production"}},"0.11.0":{"name":"@cocowallet/miniapp-sdk","version":"0.11.0","keywords":["coco-wallet","miniapp","sdk","wallet","ethereum","polygon","erc-4337","smart-account"],"license":"MIT","_id":"@cocowallet/miniapp-sdk@0.11.0","maintainers":[{"name":"cocovickcharles","email":"vickler@cocowallet.app"}],"homepage":"https://github.com/coco-mercado/coco-wallet/tree/masterV3/packages/miniapp-sdk#readme","bugs":{"url":"https://github.com/coco-mercado/coco-wallet/issues"},"dist":{"shasum":"8881b42dfafc846670f04ffc760b6f51340fd48a","tarball":"https://registry.npmjs.org/@cocowallet/miniapp-sdk/-/miniapp-sdk-0.11.0.tgz","fileCount":8,"integrity":"sha512-WEPT5HBikp5IJ6vqS4FOVf8ot71ChQ2Ah1WUzBli+/v8yTLBWbFx/L4y9CpECenBbV+wLqYEl6jPXphBNsoOFg==","signatures":[{"sig":"MEQCIEBGMYaCVSw6kg09Zj07McVQsNCR0DGy2KWtVHapKfTIAiAnzaWkmKVja7mH2cLjJUs4lbzbdirkXff+3yenIjs3Mg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDHgjN5vjeRBGaB01rueW7mmOcHb3VJPS82F8pKzUCrZgIgCHaySho+ywuNdygnhejlxJj2zOW4XwF7auXMuA28w1k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":141343},"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"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.js"}},"scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","sync-sdk":"node scripts/sync-vendored.mjs","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"cocovickcharles","email":"vickler@cocowallet.app"},"repository":{"url":"git+https://github.com/coco-mercado/coco-wallet.git","type":"git","directory":"packages/miniapp-sdk"},"_npmVersion":"10.9.2","description":"JavaScript SDK for Coco Wallet mini apps. Exposes the user's smart account and transaction signing to web apps embedded in Coco's WebView.","directories":{},"_nodeVersion":"23.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.9","typescript":"^5.4.0","@types/node":"^20.11.8"},"_npmOperationalInternal":{"tmp":"tmp/miniapp-sdk_0.11.0_1790087153579_0.44436936998677323","host":"s3://npm-registry-packages-npm-production"}},"0.13.1":{"name":"@cocowallet/miniapp-sdk","version":"0.13.1","keywords":["coco-wallet","miniapp","sdk","wallet","ethereum","polygon","erc-4337","smart-account"],"license":"MIT","_id":"@cocowallet/miniapp-sdk@0.13.1","maintainers":[{"name":"cocovickcharles","email":"vickler@cocowallet.app"}],"homepage":"https://github.com/coco-mercado/coco-wallet/tree/masterV3/packages/miniapp-sdk#readme","bugs":{"url":"https://github.com/coco-mercado/coco-wallet/issues"},"dist":{"shasum":"a8ea5d01bc0176dd8d8ebd767d62af0a70cd74d9","tarball":"https://registry.npmjs.org/@cocowallet/miniapp-sdk/-/miniapp-sdk-0.13.1.tgz","fileCount":8,"integrity":"sha512-PkoOnvzOcB+cRPsvrE/q85LeMkulcPnQEhWZ3AkAseMH6NliEzTUwNUWK6k4Ry3dh5Pec2dpbqja8aECbLIQow==","signatures":[{"sig":"MEYCIQC2rOxpvaCSejOVlrg0sqhknNU+o+PaXCa+24OJQu/UDQIhAIEvuetH4foXM0/7nJ8i0r2Dg8c17Dj+Xlqdv7ijetNJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDj8cj1CadoHo9z4gzO9hM7/7VfIeQP7eJFE+uydxIGLgIgIC3SCQU0Ik4+IfNJt//ceBTLoMcm4lmmGOw4H0KB/DE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":152380},"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"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.js"}},"scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","sync-sdk":"node scripts/sync-vendored.mjs","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"cocovickcharles","email":"vickler@cocowallet.app"},"repository":{"url":"git+https://github.com/coco-mercado/coco-wallet.git","type":"git","directory":"packages/miniapp-sdk"},"_npmVersion":"10.9.2","description":"JavaScript SDK for Coco Wallet mini apps. Exposes the user's smart account and transaction signing to web apps embedded in Coco's WebView.","directories":{},"_nodeVersion":"23.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.9","typescript":"^5.4.0","@types/node":"^20.11.8"},"_npmOperationalInternal":{"tmp":"tmp/miniapp-sdk_0.13.1_1790705670004_0.632134523256259","host":"s3://npm-registry-packages-npm-production"}},"0.14.0":{"_id":"@cocowallet/miniapp-sdk@0.14.0","bugs":{"url":"https://github.com/coco-mercado/coco-wallet/issues"},"dist":{"shasum":"cb897f9297a185374ebb98cb224ec3a902a26fc5","tarball":"https://registry.npmjs.org/@cocowallet/miniapp-sdk/-/miniapp-sdk-0.14.0.tgz","fileCount":8,"integrity":"sha512-NnOTVdYFZwExOqDl/u3hp0Jx1gwMQ2lYAiSavLQC19CJlOBVYDjLeNs50UFGDyO0khOzhF2BOV4CyZFSqBmVgg==","signatures":[{"sig":"MEUCIGPKq7cSM2g6I6eVUrIQoxjyBwxxhH48OV0v5lcj7m4QAiEAl7j4vFjbLufwlV8vpliYdm5j4NMOhjHdQrYP3ru2AwQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQClqCuxvW8s1U8aPl8nlNm+uHvE5bf4ObAHKz3yQeD/xAIgeYouH/ijeDlX0Fxows38rkqo9TdDpvr21FYnu7zrukM="}],"unpackedSize":162222},"main":"dist/index.js","name":"@cocowallet/miniapp-sdk","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.js"}},"license":"MIT","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","sync-sdk":"node scripts/sync-vendored.mjs","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"version":"0.14.0","_npmUser":{"name":"cocovickcharles","email":"vickler@cocowallet.app"},"homepage":"https://github.com/coco-mercado/coco-wallet/tree/masterV3/packages/miniapp-sdk#readme","keywords":["coco-wallet","miniapp","sdk","wallet","ethereum","polygon","erc-4337","smart-account"],"repository":{"url":"git+https://github.com/coco-mercado/coco-wallet.git","type":"git","directory":"packages/miniapp-sdk"},"_npmVersion":"10.9.2","description":"JavaScript SDK for Coco Wallet mini apps. Exposes the user's smart account and transaction signing to web apps embedded in Coco's WebView.","directories":{},"maintainers":[{"name":"cocovickcharles","email":"vickler@cocowallet.app"}],"_nodeVersion":"23.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.9","typescript":"^5.4.0","@types/node":"^20.11.8"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/miniapp-sdk_0.14.0_1790715911507_0.5360394493427378"}}},"time":{"created":"2026-05-08T14:34:06.889Z","modified":"2026-09-29T21:05:11.863Z","0.1.0":"2026-05-08T14:34:07.158Z","0.2.0":"2026-06-24T18:57:56.848Z","0.3.0":"2026-06-24T19:02:21.383Z","0.3.1":"2026-07-07T11:47:24.468Z","0.4.0":"2026-07-16T17:19:21.632Z","0.4.1":"2026-07-16T19:17:55.017Z","0.4.2":"2026-07-17T10:18:55.522Z","0.6.0":"2026-08-01T09:05:24.310Z","0.6.1":"2026-08-11T08:01:30.481Z","0.7.0":"2026-08-20T15:05:00.064Z","0.8.0":"2026-09-09T10:33:25.692Z","0.9.0":"2026-09-17T17:01:02.012Z","0.11.0":"2026-09-22T14:25:53.675Z","0.13.1":"2026-09-29T18:14:30.085Z","0.14.0":"2026-09-29T21:05:11.638Z"},"bugs":{"url":"https://github.com/coco-mercado/coco-wallet/issues"},"license":"MIT","homepage":"https://github.com/coco-mercado/coco-wallet/tree/masterV3/packages/miniapp-sdk#readme","keywords":["coco-wallet","miniapp","sdk","wallet","ethereum","polygon","erc-4337","smart-account"],"repository":{"url":"git+https://github.com/coco-mercado/coco-wallet.git","type":"git","directory":"packages/miniapp-sdk"},"description":"JavaScript SDK for Coco Wallet mini apps. Exposes the user's smart account and transaction signing to web apps embedded in Coco's WebView.","maintainers":[{"name":"cocovickcharles","email":"vickler@cocowallet.app"}],"readme":"# @cocowallet/miniapp-sdk\n\nJavaScript SDK for building mini apps inside [Coco Wallet](https://coco.mercado). Your web app runs in an in-wallet WebView with access to the user's Smart Account (ERC-4337, gas paid by Coco's paymaster). Transactions run on Polygon mainnet (137) by default, or on Base (8453) — see [Supported chains](#supported-chains).\n\n## Install\n\n```bash\nnpm install @cocowallet/miniapp-sdk\n```\n\n## Usage\n\n```ts\nimport { MiniApp } from '@cocowallet/miniapp-sdk';\n\n// 1. Read the user's wallet\nconst { address, chainId } = await MiniApp.getAddress();\nconst { name } = await MiniApp.getUserInfo();\n\n// 2. Sign a message (personal_sign over the user's EOA)\nconst { signature } = await MiniApp.signMessage('Login to MyApp at ' + Date.now());\n\n// 3. Send a transaction — gas paid by Coco, no popup for approvals you already have\n// Native USDC on Polygon (6 decimals).\nconst USDC_POLYGON = '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359';\nconst { hash } = await MiniApp.sendTransaction({\n  to: USDC_POLYGON,\n  data: '0xa9059cbb...', // encoded transfer(recipient, amount)\n  value: '0x0',\n});\n```\n\n## Error handling\n\nAll methods reject with a plain `Error` whose `message` is prefixed with one of:\n\n| Prefix | Meaning |\n|---|---|\n| `USER_REJECTED:` | User dismissed the signing sheet. |\n| `BUSY:` | Another wallet confirmation (transaction, signature or payout) is already open. Wait for it to settle before sending the next one. |\n| `TIMEOUT:` | No response from the wallet: 120 s for most calls, 30 min for `sendTransaction` / `sendTransactionBatch` (a charge can include a cross-chain conversion). |\n| `INSUFFICIENT_GAS_FUNDS:` | Neither gasless nor token-paymaster gas available. |\n| `INSUFFICIENT_FUNDS:` | Not enough balance for the operation (e.g. a Pago Móvil payout). |\n| `NO_SESSION:` | No smart account on the wallet (user not signed in). |\n| `PROFILE_UNAVAILABLE:` | The wallet couldn't load the profile — **not** \"the user has no data\". |\n| `INVALID_PARAMS:` | Malformed request (e.g. bad `to` address). |\n| `TX_FAILED:` | Transaction submission failed for another reason. |\n| `NO_BRIDGE:` | SDK is running outside the Coco WebView. |\n| `NOTIFICATIONS_UNSUPPORTED:` | The wallet predates `MiniApp.notifications` (or the mini app was opened outside the catalog). |\n| `NOTIFICATIONS_DISABLED:` | `schedule()` called before the user enabled notifications for this mini app. |\n| `NOTIFICATIONS_FAILED:` | The notifications gateway refused (unknown `key`, limits, outage). |\n| `PICK_CONTACT_UNSUPPORTED:` | The wallet predates `MiniApp.pickContact` — check `capabilities().includes('contacts.pick')`. |\n\n`pickContact()` does **not** reject when the user closes the sheet: it resolves `null`.\n\n```ts\ntry {\n  await MiniApp.sendTransaction(tx);\n} catch (err) {\n  if (err instanceof Error && err.message.startsWith('USER_REJECTED:')) {\n    // Let the user try again\n  }\n}\n```\n\n## What's available\n\n- `MiniApp.capabilities()` — **synchronous**: what the hosting wallet supports\n- `MiniApp.getAddress(opts?)` — smart account address + chainId (Polygon 137 by default; `{ chainId: 8453 }` for Base)\n- `MiniApp.getUserInfo()` — profile: name, avatar, phone, email, dateOfBirth, gender, location, identity (KYC)\n- `MiniApp.signMessage(message)` — personal_sign, after the user confirms it in the wallet\n- `MiniApp.signTypedData(data)` — EIP-712 typed-data signing (e.g. USDC permit), after the user confirms it in the wallet\n- `MiniApp.sendTransaction({ to, data?, value?, chainId? })` — gas-sponsored tx on Polygon (default) or Base, after the user confirms it in the wallet\n- `MiniApp.sendTransactionBatch(txs)` — atomic ERC-4337 UserOp batch (one nonce), after the user confirms it in the wallet\n- `MiniApp.pickContact(options?)` — native contact picker sheet (saved contacts, phone book, search by email/wallet/phone); resolves the ONE picked contact (`{ name, phone, walletAddress, email, isCocoUser, source }`) or `null` if the user closed it. `email` is only set when the user searched by that email. Only the picked contact is shared with the mini app\n- `MiniApp.saveContact(contact)` — save a contact in the user's wallet\n- `MiniApp.getContacts()` — **deprecated → `pickContact`**; still returns the whole contact list for backward compatibility\n- `MiniApp.setTitle(title)` / `MiniApp.setCanGoBack(value)` — host top-bar control\n- `MiniApp.recordTransaction(tx)` — register a tx in the wallet activity feed (`direction: 'in'` when you pay the user; default `'out'`; `chainId: 8453` when the tx is on Base)\n- `MiniApp.sendWhatsAppNotification(notification)` — templated WhatsApp message\n- `MiniApp.requestPagoMovilPayout(request)` — accept payments in Bs via Pago Móvil\n- `MiniApp.requestAmount(options?)` — native amount-input sheet, resolves `{ amount }`\n- `MiniApp.notifications.{isSupported, enable, disable, status, schedule, list, cancel}` — push + in-app notifications for this user, even with the mini app closed\n\nNot yet: transactions on chains other than Polygon and Base, session keys (tap-free signing).\n\n## Supported chains\n\nA mini app can send transactions on **two** chains. Anything else is rejected\nbefore the confirmation sheet opens, with\n`INVALID_PARAMS: \\`chainId\\` must be one of 137, 8453`.\n\n| Chain | `chainId` | `CHAIN_IDS` |\n|---|---|---|\n| Polygon mainnet (default when `chainId` is omitted) | 137 | `POLYGON` |\n| Base mainnet | 8453 | `BASE` |\n\nThat list applies to `sendTransaction`, `sendTransactionBatch`, `getAddress` and\n`recordTransaction`. Arbitrum (42161), Optimism (10), BNB Chain (56), Ethereum\n(1) and Avalanche (43114) are **not** valid targets, even though the wallet holds\nbalances there: the smart account on those chains has no paymaster sponsorship\nfor mini-app contracts, so the wallet refuses rather than charge the user gas.\n`recordTransaction` types `chainId` as `number`, but the wallet enforces the\nsame two values.\n\n`signMessage` and `signTypedData` take no `chainId`: they are signatures from\nthe user's EOA, not transactions. An EIP-712 `domain.chainId` is shown to the\nuser but not restricted — it is the verifying contract that decides whether it\naccepts it.\n\nThe chains the wallet can **convert from** when you declare `requiredFunds` are\na different, wider list: Polygon, Base, Arbitrum and Optimism. The converted\nfunds always land on your transaction's chain (137 or 8453). Ethereum and BNB\nChain are never used as a source (their gas costs more than a small payment),\nand Avalanche is hidden in the wallet.\n\n## Every signature is confirmed by the user, in the wallet\n\nNothing your mini app calls can move the user's funds, sign, or grant a\npermission without the user confirming it in the wallet's **native** sheet, in\nthat same request. That covers `sendTransaction`, `sendTransactionBatch`,\n`signMessage`, `signTypedData` and `requestPagoMovilPayout`. There is no flag,\noption or timing that skips it — `confirm: false`, `showProgress: false` or a\ncall fired on page load all still open the sheet.\n\nWhat the sheet shows comes from the wallet, never from your copy: your mini\napp's name from the catalog, and what the wallet decoded from the calldata —\nrecipient, amount, token, network — with an explicit warning for token\napprovals (`approve`, especially unlimited ones), `setApprovalForAll`, Permit2,\nand for EIP-712 permits (`Permit`, `PermitSingle`, …), which the user sees as a\nspending authorisation rather than \"sign a message\".\n\nOne confirmation at a time: while one is open, any other of those calls\nrejects with `BUSY:`. Chain your calls (`await` each one) instead of firing\nthem in parallel.\n\n## Let the wallet cover a short balance\n\nUsers hold funds spread across several tokens and chains, so a payment can fail\neven when the user has more than enough money — just not in the token you charge\nin. Declare what the transaction needs and the wallet converts the difference and\npays, in one confirmation, without the user leaving your mini app.\n\n```ts\nawait MiniApp.sendTransaction({\n  to: USDC,\n  data: encodeTransfer(merchant, amount),\n  chainId: CHAIN_IDS.BASE,\n  requiredFunds: { token: 'USDC', amount: '0.05' },  // human units, as a string\n});\n```\n\nThe wallet checks the balance **before signing**. If it falls short it picks the\nuser's best other token, quotes the conversion, shows the cost and the wait, and\nonly then converts and pays. If the balance already covers it, nothing changes.\n\n**Don't pre-check the balance yourself and bail out.** That is the most common\nreason this never kicks in: if your mini app throws before calling\n`sendTransaction`, the wallet never sees the payment and cannot offer to convert.\nLet the transaction through and let the wallet decide.\n\nDeclaring `requiredFunds` is the opt-in, and removing it is the off switch — the\nwallet never infers the amount from your calldata, so a transaction without this\nfield behaves exactly as it always did.\n\n`requiredFunds` is optional and travels inside the transaction object, so it\nworks on wallets and SDK versions that predate it — older SDKs simply forward the\nfield. On a wallet that doesn't support it, the field is ignored and you get the\nprevious behaviour.\n\n## The wallet runs the confirmation screen\n\nEvery mini app that charges ends up building the same three screens: a review of\nthe amount, a spinner while the wallet signs, and a receipt. The wallet does all\nthree, in its own sheet, for every transaction (`confirm: true` is accepted but\nno longer needed — the sheet always shows):\n\n```ts\nawait MiniApp.sendTransaction({\n  to: USDC,\n  data: encodeTransfer(merchant, amount),\n  chainId: CHAIN_IDS.BASE,\n  requiredFunds: { token: 'USDC', amount: '0.05' },\n  confirm: true,\n});\n```\n\nThe sheet shows the amount, the `token · network` pill, who is being paid and the\nfee, with Confirm and Cancel. On confirm it **stays up** through the signature and\nshows the outcome inside it, so your promise resolves when the whole operation is\nover and you never render a loading state of your own. Cancelling arrives as\n`USER_REJECTED`.\n\nWith `requiredFunds` the headline is the amount and the token — the same number\nthe wallet checks the balance against. Without it the sheet still shows, with\nthe decoded calls as its content. If your calldata transfers more of that token\nthan you declared, the sheet warns the user.\n\nIt composes with the section above. If the balance falls short, the same sheet\nadds the conversion as a detail row under the payment: one confirmation, never two\nsheets in a row.\n\nIt is a flag and **not** an object with your own copy, on purpose. A native sheet\nrendering text you wrote would lend the wallet's face to claims the wallet cannot\nverify. Everything specific to your business — the plan, the order, the merchant —\nbelongs on your own screen, before this.\n\n**Gate it on the capability before you remove your own review screen:**\n\n```ts\nconst canConfirm = MiniApp.capabilities().includes('tx.confirm');\n```\n\nOn a wallet that predates this, there may be no native review at all — which is\nfine while you still have yours, and a problem if you deleted it. Keep your own\nsuccess screen either way: it is what the user sees when the sheet closes.\n\nTo show it in your own UI (\"pay with your other coins\"), gate on the capability —\nit is synchronous, so it costs you nothing:\n\n```ts\nif (MiniApp.capabilities().includes('funding.autoSwap')) { … }\n```\n\nThat tells you the wallet understands the contract. Whether the conversion is\nactually enabled also depends on the wallet's remote configuration, so keep\nhandling `INSUFFICIENT_FUNDS` either way.\n\nNew errors to expect, on top of `INSUFFICIENT_FUNDS`:\n\n| Code | Meaning |\n|---|---|\n| `FUNDING_FAILED` | The conversion could not be made. Nothing was charged. |\n| `FUNDING_PENDING` | The conversion is on its way to the user's wallet. The money is safe, but the payment could not complete yet. |\n\n## `showProgress` (legacy)\n\nOlder wallets covered your mini app with a full-screen \"Procesando…\" loader\nwhile a transaction was signed, and `showProgress: false` kept your mini app on\nscreen instead. Current wallets show the progress inside the confirmation sheet\nand never cover your mini app, so the flag is a no-op. It never skipped — and\ncannot skip — the user's confirmation. Keep your own progress UI either way.\n\n## Knowing what the wallet supports\n\nYour mini app ships independently of the wallet, so it can end up running on a\nversion that predates the field you want. `capabilities()` tells you what the\nhost actually supports, and it's **synchronous** — readable before your first\n`await`:\n\n```ts\nif (MiniApp.capabilities().includes('profile.extended')) {\n  const me = await MiniApp.getUserInfo();\n  prefill(me.email, me.dateOfBirth, me.location);\n} else {\n  askUserManually();   // old wallet: those fields aren't there\n}\n```\n\n| Capability | Means |\n|---|---|\n| `profile.extended` | The profile carries `email`, `dateOfBirth`, `gender` and `location`. |\n| `profile.identity` | The profile carries the user's KYC state (`identity`). |\n| `funding.autoSwap` | `requiredFunds` works: the wallet covers a short balance by converting. |\n| `tx.confirm` | The wallet runs the review, the progress and the receipt in its own sheet, for every transaction. |\n| `tx.showProgress` | The wallet understands `showProgress` (a no-op today: it never covers your mini app with a loader, and never skips the confirmation). |\n| `notifications` | `MiniApp.notifications` works: opt-in, per-user schedules, push + notification center. |\n\nAn **empty list means an older wallet** — fall back to your previous behaviour.\nTwo rules worth internalising:\n\n- **Don't infer capabilities from the SDK version.** The SDK ships with your mini\n  app; the capabilities belong to the wallet running it. A new SDK on an old\n  wallet is a completely normal situation.\n- **Don't probe by calling and catching.** A method the wallet doesn't implement\n  doesn't fail fast — it hangs until `TIMEOUT:` (120 s). That's why this check is\n  synchronous.\n\n## Who the user is\n\n`getUserInfo()` returns the user's wallet profile. Only `name` and `identity`\nare always present; everything else is `null` when the user hasn't filled it in\n(and `undefined` on wallet versions older than the field), so read defensively:\n\n```ts\nconst me = await MiniApp.getUserInfo();\nme.name;                  // \"Kevin Charles\"\nme.avatar;                // photo URL or null → render initials\nme.phone;                 // \"584141234567\" or null\nme.email ?? null;         // \"kevin@example.com\"\nme.dateOfBirth ?? null;   // \"1994-03-21\" (YYYY-MM-DD)\nme.gender ?? null;        // 'male' | 'female' | 'other' | 'prefer_not_to_say'\nme.location?.country;     // \"Venezuela\" — also city/state/street/postalCode\nme.identity.verified;     // true when the user passed KYC in the wallet\nme.identity.providers;    // [\"bridge\", …] — who verified them\n```\n\nUse `identity.verified` to unlock things that need a verified person (higher\nlimits, payouts to third parties), not to gate payments — the wallet already\nconfirms every charge natively.\n\n### What `null` means (and what it doesn't)\n\n`null` means exactly one thing: **the user hasn't filled that field in**. It\nnever means \"the wallet couldn't fetch it\" — otherwise you'd prefill a form\nleaving an email blank that the user actually has, with no way to tell.\n\nThe wallet loads the profile when your mini app opens and waits for it if you\nask early, so a complete profile always arrives complete. When it genuinely\ncan't be loaded (no connectivity, backend down) the call **rejects** instead of\nreturning half a profile:\n\n```ts\ntry {\n  const me = await MiniApp.getUserInfo();\n  prefill(me);                    // every null here is \"the user doesn't have it\"\n} catch (err) {\n  const msg = err instanceof Error ? err.message : '';\n  if (msg.startsWith('PROFILE_UNAVAILABLE:')) return askUserManually();\n  throw err;\n}\n```\n\nThe user can review exactly which of these fields your mini app read, from the\nwallet's mini-app menu (`⋮` → \"Datos compartidos\"). Read only what your flow\nneeds.\n\n## Accept payments in bolívares (Pago Móvil)\n\nCharge the user in USD and get paid in bolívares — without touching bank rails\nyourself. Your mini app prices in USD; the wallet debits the user's stablecoin\nbalance, converts at the current VES/USD rate, and delivers the Bs to the Pago\nMóvil account you specify (typically your commerce's account, fixed in your\ncode). The user confirms the exact Bs amount in a native wallet sheet before\nanything moves.\n\n```ts\nconst result = await MiniApp.requestPagoMovilPayout({\n  amountUsd: 25,\n  beneficiary: {\n    phone: '04141234567',\n    documentId: 'J401234567',\n    bankCode: '0102',\n    bankName: 'Banco de Venezuela',\n    name: 'Pedro Perez', // as registered at the bank, or the bank rejects it\n  },\n  comment: 'Pedido #123',\n  reference: 'order-123', // echoed back for reconciliation\n});\n\n// result.status === 'processing' — payment queued, bank settlement is async.\n// result.amountBs / result.exchangeRate — what your account receives.\n// While the bank settles, the user's USD sits protected in an escrow contract:\n// released to the payment when the bank confirms, refunded if it fails\n// (result.escrowOrderId identifies that protection order).\n```\n\n### How batching works\n\n`batchTransactions` lets you run up to 3 of your own contract calls **in the\nsame operation as the charge**. The wallet builds a single ERC-4337 UserOp\ncontaining your transactions first, then the payment — so the user sees **one\nconfirmation sheet and signs once**, and the whole batch is **atomic**: either\nevery step lands in the same on-chain transaction or none does. There is never\nan intermediate state (your call executed but the payment not queued, or vice\nversa), and no nonce races between steps.\n\nUse it whenever the funds covering `amountUsd` need an on-chain step to become\nspendable first — releasing tokens from a vault or escrow, unwrapping,\nconverting:\n\n```ts\nawait MiniApp.requestPagoMovilPayout({\n  amountUsd: 25,\n  beneficiary: MERCHANT_PAGO_MOVIL,\n  batchTransactions: [\n    { to: MY_CONTRACT, data: encodedCall }, // frees the USDC that funds the charge\n  ],\n  reference: 'order-123',\n});\n```\n\nOrder inside the batch: your `batchTransactions` (in array order) → the\npayment. Gas for the whole batch is covered by Coco's paymaster, like every\nother mini-app transaction.\n\nExtra error prefixes for this method: `PAYOUT_FAILED:` (bank payout could not\nbe queued; escrow refund protects the funds) and `RATE_UNAVAILABLE:` (no\nVES/USD rate right now) on top of the common `USER_REJECTED:` /\n`INSUFFICIENT_FUNDS:`.\n\n## Notify the user later\n\nYour mini app can reach the user when it's closed — a push plus an entry in the\nwallet's notification center that reopens the mini app on tap. It's built on\nthree pieces:\n\n1. **The copy** is defined by the mini app's owner from the Claude Code plugin\n   (`create_notification`), one `key` per notification, with `{{placeholders}}`.\n   The SDK never sends free text.\n2. **The opt-in** happens here, once: `enable()` shows the wallet's native\n   consent sheet. Nothing is ever sent to a user who didn't accept.\n3. **The trigger** is one of: a per-user schedule created here (`schedule()`),\n   an app-level cron on the definition, or your own server calling the gateway\n   (`POST /notifications/send`) — for example a cron that notices a won bet.\n\n```ts\nif (MiniApp.notifications.isSupported()) {\n  try {\n    await MiniApp.notifications.enable();                 // after the first deposit, not on open\n    await MiniApp.notifications.schedule({\n      key: 'yield_report',                                // defined by the owner in the MCP\n      every: '15d',                                       // \"<n>m|h|d|w\" or a `cron`\n      params: { plan: 'Viaje' },                          // static values for the copy\n    });\n  } catch (err) {\n    if (err instanceof Error && err.message.startsWith('USER_REJECTED:')) {\n      // They said no — respect it, don't ask again this session.\n    }\n  }\n}\n```\n\nRules of thumb:\n\n- **Ask after value, never on open.** Call `enable()` right after the action\n  the notification is about (first deposit, first bet). `USER_REJECTED:` is a\n  real answer; don't loop on it.\n- **Gate with `isSupported()`** (synchronous). On older wallets it's `false`;\n  if you call anyway, the wallet answers `NOTIFICATIONS_UNSUPPORTED:` right\n  away — it never hangs.\n- **`schedule()` is idempotent** for the same `key` + recurrence, so an\n  \"ensure\" call on every deposit is fine. `list()` shows the user's schedules;\n  `cancel(id)` removes one (e.g. when they withdraw everything).\n- **Per-user values that change over time** (how much yield they earned) don't\n  go in `params`: the owner sets a `webhookUrl` on the definition and the\n  gateway asks your server for fresh params right before each send.\n- `disable()` opts the user out and pauses their schedules; the wallet also\n  offers this from the mini app's top-bar menu, so don't build your own toggle\n  unless you want one.\n- A short `every` (minutes) is only accepted by the develop gateway — use it to\n  test, then ship the real interval.\n\nUse `status()` to reflect the state in your UI (`enabled`, and `pushPermission`\n— `'denied'` means the user will only see the notification in the wallet's\nnotification center).\n\n## Registrar lo que pasa, para marketing\n\n`MiniApp.track()` deja constancia de un hecho de la mini app en **RD Station**, el CRM donde marketing arma segmentaciones y automatizaciones. El evento queda asociado al contacto real del usuario, con el nombre `miniapp-<slug>-<evento>`.\n\n```ts\nMiniApp.track('plan_creado', { monto: 25 });\n```\n\n- **No devuelve promesa y nunca lanza.** Un evento de marketing no puede romper ni frenar un flujo de producto: fuera de la wallet, sin configurar o con el gateway caído, simplemente no pasa nada.\n- **El evento se declara antes**, una sola vez, desde el plugin (`create_event`). El gateway rechaza uno desconocido — la cuenta de RD la comparte todo el equipo y sus eventos de conversión no se borran nunca.\n- **El nombre completo lo pone el gateway.** Acá va la key corta; el prefijo `miniapp-<slug>-` y los tags los agrega él, así \"compra\" de dos mini apps distintas no termina siendo el mismo evento para marketing.\n- **Nunca mandes PII.** El email lo resuelve el gateway a partir de la address; en `props` van datos del hecho (monto, plan), no datos de la persona.\n\nConfiguración: `NEXT_PUBLIC_COCO_GATEWAY_URL`, `NEXT_PUBLIC_COCO_MINIAPP_SLUG` y `NEXT_PUBLIC_COCO_EVENT_TOKEN` (el token **público** de eventos, write-only, pensado para viajar en el bundle). Las escribe el MCP en `.env.local`. Si usás otro framework, `MiniApp.configureEvents({ gatewayUrl, slug, token })`.\n\nUn evento disparado desde el navegador **no es prueba de nada** (es falsificable y lo pierde un adblock o una pestaña que se cierra): úsalo para navegación, intención y abandono. Lo que importa —una compra, un depósito, una apuesta confirmada— se manda desde tu servidor con `coco.events.track(...)`, abajo.\n\n## The server half: `@cocowallet/miniapp-sdk/server`\n\nEverything above runs in the WebView and talks to **the wallet**. A mini app has a second half — its own backend (a route handler, a webhook, a cron) — and that one talks to **the Coco gateway**: sending email, sending notifications, reading who subscribed.\n\n```ts\n// src/app/api/orders/route.ts\nimport { coco } from '@cocowallet/miniapp-sdk/server';\n\nexport async function POST(req: Request) {\n  const order = await createOrder(await req.json());\n\n  await coco.email.send({\n    key: 'order_receipt',                                  // template created with the MCP\n    to: [{ email: order.email, params: { nombre: order.name, orden: order.id } }],\n    idempotencyKey: `order_receipt:${order.id}`,           // survives retries and double taps\n  });\n\n  return Response.json(order);\n}\n```\n\n| | |\n|---|---|\n| `coco.email.send(...)` | Up to 50 recipients, each with their own `params`. Returns `sent`, `skipped` (`UNSUBSCRIBED`, `DUPLICATE`, `RATE_LIMIT`), `failed`. |\n| `coco.email.preview(...)` | Renders without sending. |\n| `coco.email.listMessages(...)` · `listUnsubscribes()` | The delivery log and the opt-out list. |\n| `coco.notifications.send(...)` · `listSubscribers()` | Push + the wallet's notification center, for users who opted in. |\n| `coco.events.track(...)` · `listDeliveries(...)` | El hecho confirmado → conversión en RD Station. Devuelve `status` (`sent`, `pending`, `skipped`, `failed`) y el `reason`: un usuario sin email es `skipped: no_contact`, no un error. |\n\nConfiguration comes from `COCO_GATEWAY_URL`, `COCO_MINIAPP_SLUG`, `COCO_EMAIL_TOKEN` (the mini app's own send credential, minted once by the gateway), `COCO_EVENT_TOKEN` (its event credential, minted with the first `create_event`) and `COCO_GATEWAY_TOKEN` for notifications — the MCP writes them into `.env.local` and `deploy_mini_app` injects them into Vercel. `createCocoClient({ ... })` takes them explicitly for tests or a backend serving several mini apps.\n\n**It refuses to initialise in a browser**, on purpose. `COCO_GATEWAY_TOKEN` is Coco's credential, not the user's: in the client, anyone with DevTools could send email from a verified `@mail.cocowallet.app` address under any mini app's name. The client's job is to call *your* API; your API calls the gateway.\n\nErrors come back as `CocoGatewayError` with the gateway's own `code` (`NO_TEMPLATE`, `RATE_LIMIT`, `UNAUTHORIZED`, `NETWORK`, …), so you can branch on it instead of matching message strings. A failed email should rarely fail the request that triggered it — log it and move on.\n\n## Outside the wallet\n\nThe SDK will throw `NO_BRIDGE` if `window.flutter_inappwebview` isn't present. For local dev outside the WebView, stub the methods or guard your UI:\n\n```ts\nconst inCocoWallet = typeof window !== 'undefined'\n  && !!(window as any).flutter_inappwebview;\n```\n","readmeFilename":"README.md"}