Login

Introduction

Signup provides an easy to use Login feature so developers can request the users for their Bitcoin Cash address and Cash Account. This API is a client side login and should not be used as a proof to provide server side resources to the user. If you need something like that, you need to ask users to sign a payload for you (more on this in Signatures section).

Request

signup.requestAccess(["bch_address", "cash_account"])
.then(({cashAccount, bchAddr}) => {
// logged in
console.log(cashAccount, bchAddr);
});

Or you can use Async Await syntax:

const { cashAccount, bchAddr } = await signup.requestAccess([
"bch_address",
"cash_account"
]);
// logged in
console.log(cashAccount, bchAddr);