Socket
Socket
Sign inDemoInstall

@midcontract/protocol

Package Overview
Dependencies
15
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @midcontract/protocol

Crypto payment protocol with escrow


Version published
Weekly downloads
59
decreased by-52.03%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

@midcontract/protocol

Crypto payment protocol with escrow

stateDiagram-v2
    [*] --> PENDING
    PENDING --> SUBMITTED: submit
    SUBMITTED --> PENDING: approve
    SUBMITTED --> DISPUTED: dispute
    PENDING --> DISPUTED: dispute
    DISPUTED --> PENDING: resolve
    PENDING -->  [*]
sequenceDiagram
    opt Success
        Alice ->> Escrow: deposit
        Bob ->> Escrow: submit
        Alice ->> Escrow: reject
        Bob ->> Escrow: submit
        Alice ->> Escrow: approve
        Bob ->> Escrow: claim
    end
    opt Withdraw
        Alice ->> Escrow: deposit
        Bob -x Escrow: submit
        Alice ->> Escrow: withdraw
    end
    opt Dispute
        Alice ->> Escrow: deposit
        Bob ->> Escrow: submit
        Alice ->> Escrow: reject
        Bob ->> Escrow: dispute
        alt Bob
            Platform ->> Escrow: approve
            Bob ->> Escrow: claim
        else Alice
            Platform ->> Escrow: reject
            Alice ->> Escrow: withdraw
        end
    end

Install

npm install --save-prod @midcontract/protocol

Licensing

The primary license for the Midcontract protocol is MIT, see LICENSE

Keywords

FAQs

Last updated on 02 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc