Smart Invoice is an easy-to-use tool that empowers web3 freelancers with secure cryptocurrency invoicing, escrow services, and arbitration. Designed to streamline the payment process, Smart Invoice ensures that freelancers and clients can transact with confidence, knowing that funds are securely held in escrow until work is completed to satisfaction.
This project is organized as a pnpm monorepo, containing several packages to handle different aspects of the Smart Invoice protocol. Below is an overview of the key packages:
To get started with Smart Invoice, install the necessary dependencies using pnpm
:
pnpm install
Several packages in the Smart Invoice monorepo are published on npm and can be used directly in your project. Below are the installation commands for these packages:
constants: Install the constants package:
pnpm add @smartinvoicexyz/constants
graphql: Install the GraphQL package:
pnpm add @smartinvoicexyz/graphql
hooks: Install the React hooks package:
pnpm add @smartinvoicexyz/hooks
utils: Install the utilities package:
pnpm add @smartinvoicexyz/utils
types: Install the TypeScript types package:
pnpm add @smartinvoicexyz/types
forms: Install the forms package:
pnpm add @smartinvoicexyz/forms
ui: Install the ui package:
pnpm add @smartinvoicexyz/ui
shared: Install the shared utilities and components package:
pnpm add @smartinvoicexyz/shared
These packages can be integrated into your own projects to leverage the core functionalities of the Smart Invoice protocol.
We follow Semantic Versioning for all packages in the Smart Invoice monorepo. To keep versions synchronized across packages, we use syncpack
. After making changes and updating versions in package.json
, you can ensure consistency by running:
pnpx syncpack fix-mismatches
This command checks for version mismatches and updates them across the monorepo to maintain alignment.
All metadata uploaded to IPFS and saved as details in a Smart Invoice contract must adhere to the following schema:
{
projectName: "Project Name",
projectDescription: "Description of the project",
projectAgreement: [{
type: "https", // or "ipfs"
src: "https://urlToAgreement.com",
createdAt: "seconds since epoch"
}],
startDate: UNIX_TIMESTAMP,
endDate: UNIX_TIMESTAMP
}
type
and src
that must match exactly.Join our community on Discord for support, discussions, and updates about Smart Invoice.