1.1.0 • Published 15 days ago

@radixdlt/rola v1.1.0

Weekly downloads
-
License
SEE LICENSE IN RA...
Repository
github
Last release
15 days ago

License

ROLA (Radix Off-Ledger Authentication)

ROLA is a method of authenticating something claimed by the user connected to your dApp with the Radix Wallet. It uses the capabilities of the Radix Network to make this possible in a way that is decentralized and flexible for the user.

ROLA is intended for use in the server backend portion of a Full Stack dApp. It runs "off-ledger" alongside backend business and user management logic, providing reliable authentication of claims of user control using "on-ledger" data from the Radix Network.

Resources

What is ROLA

Getting started

npm install @radixdlt/rola

How to use

import { Rola, NetworkId, SignedChallenge } from '@radixdlt/rola'

const { verifySignedChallenge } = Rola({
  networkId: NetworkId.RCNetV3,
  applicationName: 'Gumball Club',
  dAppDefinitionAddress:
    'account_tdx_e_128uml7z6mqqqtm035t83alawc3jkvap9sxavecs35ud3ct20jxxuhl',
  expectedOrigin:
    'https://radix-dapp-toolkit-dev.rdx-works-main.extratools.works',
})

// signed challenge response returned from wallet
const signedChallenge = {
  challenge: 'b519902dd21c9669b81bb5023687879d178e5c4991ba1d0ee9e131cee365bafa',
  proof: {
    publicKey:
      '1456b4da4ee62da249459f2180b83e5ebd5db8bad2ed1d8f35f51e7ec2cc98ce',
    signature:
      '8335e38096b3f0ac943c04e4c0b286af8cb711cb5f603a023d1d387fdd0cfae1a0255bcdb5d75cd43690413798959bd4c05af9b86f30d6ff74561bb9c8869202',
    curve: 'curve25519',
  },
  address:
    'identity_tdx_e_122mta8gr4tnjwywlxp5pdt03wfrd68pckne5z3cg2ce4kl3lw48ucy',
  type: 'persona',
}

const result = await verifySignedChallenge(signedChallenge)

// handle error response
if (result.isErr()) throw result.error

Examples

Full stack example

2.0.0-dev.1

15 days ago

1.1.0

1 month ago

1.0.5

1 month ago

1.1.0-dev.1

1 month ago

1.0.4

2 months ago

1.0.3

4 months ago

1.0.2

6 months ago

1.0.1

7 months ago

1.0.0

8 months ago

0.3.2

8 months ago

0.3.1

8 months ago

0.3.1-rcnet-v3.1.1

8 months ago

0.3.0-rcnet-v3.1.1

8 months ago

0.2.1

8 months ago

0.2.1-rcnet-v3.2

8 months ago

0.2.1-rcnet-v3.1

8 months ago

0.0.3-rcnet-v3.1

8 months ago

0.0.2

8 months ago

0.1.0-rcnet-v3.5

8 months ago

0.1.0-rcnet-v3.4

8 months ago

0.1.0-rcnet-v3.3

8 months ago

0.1.0-rcnet-v3.2

8 months ago

0.1.0-rcnet-v3.1

8 months ago

1.0.0-rcnet-v3.1

8 months ago