1.43.0 • Published 2 years ago

@arianee/arianee-wallet v1.43.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Arianee-Wallet

Arianee-Wallet is a universal UI tool kit to implement easily and quickly Arianee NFT in your web-site. Today arianee-passport is the only web-component available.

Compatible with:

  • Reactjs
  • Angular
  • VueJS
  • HTML
  • JQuery
  • COBOL

demo

How to install ?

using npm

npm install @arianee/arianee-wallet
<html>
  <head>
    <script type="text/javascript" src="./node_modules/@arianee/arianee-wallet/arianee-wallet.js"></script>
    ...

or add directly our unpkg link

<html>
<header>
  <script src="https://unpkg.com/@arianee/arianee-wallet/arianee-wallet.js"></script>
  ...

Arianee-Passport

The Arianee-Passport is a web-component which can be implemented in any web front-end project.

How it works ?

Append arianee-passport component to the document.

certificate-id: the Certificate ID to be displayed (REQUIRED)

auth: JWT (REQUIRED)

passphrase: Certificate's passphrase

A valid JWT must include 2 proprieties : 1. ID (in uppercase) : a unique id representing a user. It should not be a personal data as an email, or hash of an email. It is recommended to be a random string in order to comply to personal data laws. 2. exp : a timestamp defining when JWT will expire.

Who is an authorized JWT signer authority?

  • testnet : anyone can sign jwt

  • mainnet : only authorized public key (please contact us contact@arianee.org)

Example:

<body>

  <arianee-passport
    passphrase="{{pass}}"
    certificate-id="{{id}}"
    auth="{{jwt}}"
  ></arianee-passport>

</body>

Custom Style

ArianeeWalletStyleConfig {
  fontFamily?: string;
  buttons?: {
    color?: string;
    bgColor?: string;
    bgHoverColor?: string;
    textHoverColor?: string;
  };
  modal?: {
    bgColor?: string;
    borderColor?: string;
    titleColor?: string;
    textColor?: string;
  },
  spinnerColor?: string;
}

Example:

window.arianeeWalletStyle = {
    fontFamily: '"Roboto","Helvetica Neue",sans-serif',
    buttons: {
      color: '#222',
      bgColor: '#fec42e',
      bgHoverColor: '#e8ae16',
      textHoverColor: '#222'
    },
    modal: {
      borderColor: '#fec42e',
      titleColor: 'yellow'
    }
};

Change NETWORK

enum NETWORK {
  testnet = "testnet",
  mainnet = "mainnet",
  arianeeTestnet = "arianeetestnet",
  mumbai = "mumbai",
  polygon = "polygon"
}

if network is not defined, testnet is set by default

Example:

window.network = 'mainnet';

Languages

To pass languages, pass as a string a list of languages separted with a comma.

<arianee-passport languages='fr,en-US,es'></arianee-passport>

Can I use my own UI ?

arianee passport UI can be disabled, you can access all the available features programmatically

Example: 1. Add the passport to your document with the hide attribute

<arianee-passport
  id="passport"
  hide="true"
  passphrase="{{pass}}"
  certificate-id="{{id}}"
  auth="{{token}}"
></arianee-passport>
  1. use the Element to access the exposed Promise getMethods
async function test() {
  // loading = true
  const passport = document.getElementById('passport');
  const methods = await passport.getMethods();
  methods.openAuthenticityModal();
  // loading = false
}
  1. await passport.getMethods() is Singleton the request will be made only the first time. it's recommended to call it each time you ask for a Modal or data like the example below
async function Authenticity() {
  // loading = true
  const passport = document.getElementById('passport');
  const methods = await passport.getMethods();
  methods.openAuthenticityModal();
  // loading = false
}
		
async function share() {
  // loading = true
  const passport = document.getElementById('passport');
  const methods = await passport.getMethods();
  methods.openSharePassportModal();
  // loading = false
}
		
async function transfer() {
  // loading = true
  const passport = document.getElementById('passport');
  const methods = await passport.getMethods();
  methods.openTransferPassportModal();
  // loading = false
}

all the features provided by the passport:

wallet: ArianeeWallet
certSummary: CertificateSummary

Open Verify Authenticity Modal

openAuthenticityModal(): void

Open History Modal

openHistoryModal(): void

Open Share Passport Modal

openSharePassportModal(): void

Open Transfer Passport Modal

openTransferPassportModal(): void

Arianee API

arianee-passport web component exposes arianee api methods

owner of

ownerOf(certificateId): {address:string, isOwner:boolean, hasOwner:boolean}
1.42.0

2 years ago

1.43.0

2 years ago

1.41.0

2 years ago

1.40.1

2 years ago

1.40.0

2 years ago

1.35.1

3 years ago

1.36.1

3 years ago

1.33.1

3 years ago

1.34.1

3 years ago

1.38.0

3 years ago

1.37.1

3 years ago

1.39.0

3 years ago

1.31.1

3 years ago

1.32.1

3 years ago

1.31.0

3 years ago

1.30.0

3 years ago

1.26.0

3 years ago

1.29.0

3 years ago

1.27.0

3 years ago

1.28.0

3 years ago

1.25.0

4 years ago

1.23.0

4 years ago

1.24.0

4 years ago

1.21.0

4 years ago

1.22.0

4 years ago

1.20.0

4 years ago

1.19.0

4 years ago

1.18.0

4 years ago

1.17.0

4 years ago

1.16.0

4 years ago

1.15.0

4 years ago

1.14.0

4 years ago

1.13.0

4 years ago

1.12.0

4 years ago

1.11.0

4 years ago

1.10.0

4 years ago