{"_id":"@ar-dacity/ardacity-message-signer","_rev":"2-6b58d465af2b9ea3fa81522862bdc7aa","name":"@ar-dacity/ardacity-message-signer","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@ar-dacity/ardacity-message-signer","version":"1.0.0","keywords":["react","component","arweave","ao","message","signing"],"author":{"name":"Ar-dacity Team"},"license":"MIT","_id":"@ar-dacity/ardacity-message-signer@1.0.0","maintainers":[{"name":"ruffledzest","email":"vibhanshalok@gmail.com"}],"homepage":"https://github.com/ar-dacity/ardacity-message-signer#readme","bugs":{"url":"https://github.com/ar-dacity/ardacity-message-signer/issues"},"dist":{"shasum":"3e422a30f101b6e0ddc9d9de5fd654c446aaecec","tarball":"https://registry.npmjs.org/@ar-dacity/ardacity-message-signer/-/ardacity-message-signer-1.0.0.tgz","fileCount":9,"integrity":"sha512-tkYkvn5/ovgzsITUPQ+4I4uCx10ASCHpOVLnQNEO3zXUWc7Kj/8Q4580a5kph+8L/zc8/UEdC9LReGPRHtJSSA==","signatures":[{"sig":"MEQCIHNguQd/zR/6KrsiaY05NaXB/gl3sCsMFLGDEcJjMoIzAiBq1OBtGtp2NB11DO0F4pHwUrntoER+fFNraAiWrSbfcg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73835},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.es.js","scripts":{"build":"rollup -c","prepare":"npm run build"},"_npmUser":{"name":"ruffledzest","email":"vibhanshalok@gmail.com"},"repository":{"url":"git+https://github.com/ar-dacity/ardacity-message-signer.git","type":"git"},"_npmVersion":"11.3.0","description":"A React component for signing messages using AO transactions","directories":{},"_nodeVersion":"23.11.0","dependencies":{"@betteridea/codecell":"latest"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.5.0","rollup":"^3.20.0","typescript":"^5.0.0","@types/react":"^18.0.0","@types/react-dom":"^18.0.0","rollup-plugin-dts":"^5.3.0","@rollup/plugin-terser":"^0.4.0","@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.0.0","rollup-plugin-peer-deps-external":"^2.2.4"},"peerDependencies":{"react":">=16.8.0","react-dom":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/ardacity-message-signer_1.0.0_1745572629619_0.3597292310428186","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@ar-dacity/ardacity-message-signer","version":"1.0.1","description":"Interactive message signing component with Lua code editor for React applications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","prepublishOnly":"npm run build","postinstall":"node ./scripts/install.js"},"keywords":["react","ui","components","message","signer","lua","editor","arweave","blockchain"],"author":{"name":"ArDacity"},"license":"MIT","peerDependencies":{"react":">=16.8.0","react-dom":">=16.8.0"},"devDependencies":{"@types/node":"^20.10.5","@types/react":"^18.2.45","typescript":"^5.3.3"},"_id":"@ar-dacity/ardacity-message-signer@1.0.1","gitHead":"ead02eb4d9b0977ef4e8a6a7a0f8a4d99a9d33c4","_nodeVersion":"20.12.1","_npmVersion":"10.8.1","dist":{"integrity":"sha512-JUqetoRajy4jLXMSCZ8HECxYowZKGxyVo3+KcVIlIQA538nbQwvWKNloXhvk6Z1px8qUveMOTcSYwysER/CFRA==","shasum":"b6ca406bf2e52a095466a2e13f2fa5cfe8193854","tarball":"https://registry.npmjs.org/@ar-dacity/ardacity-message-signer/-/ardacity-message-signer-1.0.1.tgz","fileCount":8,"unpackedSize":17430,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDbCtipgo7I5EKEdgid5wrgOGC456UXZrNxaEZFGDhV4wIgfdZUpxXNtL8+HZtSMm5JItiOLbtx85yKEL7V3Ev9OKI="}]},"_npmUser":{"name":"ruffledzest","email":"vibhanshalok@gmail.com"},"directories":{},"maintainers":[{"name":"ruffledzest","email":"vibhanshalok@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ardacity-message-signer_1.0.1_1745576634304_0.4625293645239459"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-25T09:17:09.538Z","modified":"2025-04-25T10:23:54.702Z","1.0.0":"2025-04-25T09:17:09.794Z","1.0.1":"2025-04-25T10:23:54.512Z"},"author":{"name":"ArDacity"},"license":"MIT","keywords":["react","ui","components","message","signer","lua","editor","arweave","blockchain"],"description":"Interactive message signing component with Lua code editor for React applications","maintainers":[{"name":"ruffledzest","email":"vibhanshalok@gmail.com"}],"readme":"# ArDacity Message Signer\r\n\r\nA beautiful, interactive message signing component with Lua code editor for React applications.\r\n\r\n## Features\r\n\r\n- 🔒 Sign messages with custom Lua handlers\r\n- 📝 Embedded Lua code editor\r\n- 🎨 Beautiful UI with smooth animations\r\n- 🧩 Customizable appearance and behavior\r\n- 📱 Responsive design for all devices\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @ar-dacity/ardacity-message-signer\r\n# or\r\nyarn add @ar-dacity/ardacity-message-signer\r\n```\r\n\r\nDuring installation, the package will automatically copy the necessary components to your project's `/src/components/ArDacityUi/MessageSigner/` directory.\r\n\r\n## Usage\r\n\r\n### Basic Usage\r\n\r\n```jsx\r\nimport { MessageSignerForm } from './components/ArDacityUi/MessageSigner';\r\n\r\nfunction App() {\r\n  const handleSign = (result) => {\r\n    console.log('Message:', result.message);\r\n    console.log('Signature:', result.signature);\r\n    console.log('Lua Code:', result.luaCode);\r\n  };\r\n\r\n  return (\r\n    <div className=\"container mx-auto p-4\">\r\n      <MessageSignerForm \r\n        onSign={handleSign}\r\n      />\r\n    </div>\r\n  );\r\n}\r\n```\r\n\r\n### Custom Configuration\r\n\r\n```jsx\r\nimport { MessageSignerForm } from './components/ArDacityUi/MessageSigner';\r\n\r\nfunction App() {\r\n  // Custom Lua code for signing\r\n  const customLuaCode = `\r\nfunction signMessage(message)\r\n  -- Custom signature implementation\r\n  local signature = \"custom_\" .. message:gsub(\"%s+\", \"_\")\r\n  return {\r\n    signature = signature,\r\n    timestamp = os.time()\r\n  }\r\nend\r\n  `;\r\n\r\n  return (\r\n    <div className=\"container mx-auto p-4\">\r\n      <MessageSignerForm \r\n        title=\"Custom Message Signer\"\r\n        description=\"Sign your messages with our custom implementation\"\r\n        initialLuaCode={customLuaCode}\r\n        onSign={(result) => {\r\n          // Handle the signed message\r\n          alert(`Message signed: ${result.signature}`);\r\n        }}\r\n        className=\"my-8\"\r\n        style={{ maxWidth: '800px' }}\r\n      />\r\n    </div>\r\n  );\r\n}\r\n```\r\n\r\n### Using LuaIDE Separately\r\n\r\n```jsx\r\nimport { LuaIDE } from './components/ArDacityUi/MessageSigner';\r\n\r\nfunction LuaEditor() {\r\n  return (\r\n    <div className=\"container mx-auto p-4\">\r\n      <h2>Lua Code Editor</h2>\r\n      <LuaIDE\r\n        cellId=\"my-lua-editor\"\r\n        initialCode=\"-- Enter your Lua code here\\nprint('Hello, World!')\"\r\n        onProcessId={(pid) => console.log('Process started with ID:', pid)}\r\n        onNewMessage={(messages) => console.log('New messages:', messages)}\r\n        onInbox={(inbox) => console.log('Inbox updated:', inbox)}\r\n      />\r\n    </div>\r\n  );\r\n}\r\n```\r\n\r\n## API Reference\r\n\r\n### MessageSignerForm\r\n\r\n| Prop | Type | Default | Description |\r\n|------|------|---------|-------------|\r\n| title | string | 'Message Signer' | Title displayed at the top of the form |\r\n| description | string | 'Sign messages using Lua handlers' | Description text displayed below the title |\r\n| initialLuaCode | string | (Default Lua code) | Initial code to display in the Lua editor |\r\n| onSign | function | undefined | Callback function called when a message is signed. Receives an object with `message`, `signature`, and `luaCode` properties |\r\n| className | string | '' | Additional CSS classes to apply to the component |\r\n| style | object | {} | Additional inline styles to apply to the component |\r\n\r\n### LuaIDE\r\n\r\n| Prop | Type | Default | Description |\r\n|------|------|---------|-------------|\r\n| cellId | string | required | Unique identifier for the Lua code cell |\r\n| initialCode | string | required | Initial Lua code to display in the editor |\r\n| onProcessId | function | undefined | Callback function called when a process is started. Receives the process ID as a parameter |\r\n| onNewMessage | function | undefined | Callback function called when new messages are received. Receives an array of messages |\r\n| onInbox | function | undefined | Callback function called when the inbox is updated. Receives the inbox data |\r\n\r\n## Customization\r\n\r\nThe MessageSigner component uses TailwindCSS for styling. You can customize its appearance by:\r\n\r\n1. Passing additional classes via the `className` prop\r\n2. Passing inline styles via the `style` prop\r\n3. Overriding the default styles in your CSS\r\n\r\n## Browser Support\r\n\r\n- Chrome (latest)\r\n- Firefox (latest)\r\n- Safari (latest)\r\n- Edge (latest)\r\n\r\n## Development\r\n\r\nIf you want to contribute to this project:\r\n\r\n1. Clone the repository\r\n2. Install dependencies: `npm install`\r\n3. Make your changes\r\n4. Build the package: `npm run build`\r\n5. Test your changes\r\n6. Submit a pull request\r\n\r\n## License\r\n\r\nMIT © ArDacity ","readmeFilename":"README.md"}