+
+

Hello stranger! Who are you?

+
+
+
+
+ + + +
+

Create a deal to lock 5 tokens between test1.near and vasya.near: +

+await contract.makeDeal({ dealId: DEAL_ID, amount: "5", participants: ["test1.near", "vasya.near"] });
+

Lock funds into the deal: +

+await tokenContract.approve({ spender: "studio-853u597r1", tokens: "5" });
+await contract.fundDeal({ dealId: DEAL_ID });
+ +

To see current state of the deal: +

+await contract.getDeal({ dealId: DEAL_ID });
+ +

Funds are returned back when all participants confirm deal completion: +

+await contract.confirmDeal({ dealId: DEAL_ID })
+ + DEAL_ID can be any unique string used to identify given deal. +
+