Operator Sign (Op Sign) designed to enhance the user experience on the Crossbell network. Its primary goal is to streamline the interaction process by minimizing the number of manual approvals required for each transaction.
- Efficient Interactions: No need to manually approve every transaction, ensuring a smoother user experience.
- Secure Authentication: Leverage the SIWE protocol to authenticate users based on their encrypted signature.
- Delegated Operations: The Operator contract methods can carry out operations on the user's behalf, ensuring both convenience and security.
npm installcopy .env.example .envYou will need to create a wallet and obtain the private key and address, then fill in the environment variables: OP_SIGN_OPERATOR_WALLET_ADDRESS and OP_SIGN_OPERATOR_WALLET_PRIVATE_KEY.
npm run docker:dbnpm run prisma:migrate:devnpm run start:devOnce the server starts, the Swagger API docs will be available at the /docs path. For example, if you are running the server locally at port 3988, you can access the docs at http://localhost:3988/docs.
Docker:
# building new NestJS docker image
docker-compose build
# or
npm run docker:build
# start docker-compose
docker-compose up -d
# or
npm run dockerIn Node.js Environment:
npm install
npm run build
NODE_ENV=production node dist/main
In development:
npm run prisma:migrate:devIn production:
npm run prisma:migrate:deployCustomizing Endpoints in Crossbell React Kits
Check out the customizing guide here.
The Siwe module is designed to facilitate the implementation of the Sign-In with Ethereum (SIWE) protocol. It encompasses a suite of functions essential for integrating SIWE's authentication mechanisms.
The SiweTransaction module is responsible for managing a range of transactions, including posting, commenting, liking, and tipping activities.
The EventListeners module is crafted to monitor and process events generated by the Operator contract. It ensures the system responds appropriately to permissions updates and other significant contract interactions.
The CsbManager module provides utility functions that are instrumental for managing interactions with the $CSB.
The Contract module used to initialize the contract instance.
We welcome feedback and contributions from the community. Feel free to raise issues, submit pull requests, or share your insights to enhance the Operator Sign feature.
🫡 This project was initially developed by @SongKeys. Original commit logs were deleted to protect sensitive information before open-sourcing.