certified-sdk
v1.1.0
Published
This React SDK aims to help React developers create certificate template, generate new certificates and make attestations with convenience.
Downloads
230
Readme
Certified-SDK
This React SDK aims to help React developers create certificate template, generate new certificates and make attestations with convenience.
To install the SDK, you may use either of the following commands:
- npm install certified-sdk
- yarn add certified-sdk
Please note that the stable version is v1.0.10, which is also the latest version.
Usage: import { Certificate, createAttestation, createSignatureAttestation } from "certified-sdk";
The SDK offers the following usage instructions: - Certificate is the component for the certificate. - createAttestation is the function of creating the certificate with a PDF base URL. Call createAttestation when you want to create the certification and let the user sign it. The result would be as follows:
{ "attestationId": "SPA_ttdldP4FDceNUqIeo_t_s", "pdf": "https://sdk.thecertified.xyz/coa/SPA_ttdldP4FDceNUqIeo_t_s/" # You must add the edition number to this URL. }
URLs to view the attestation are as follows: - SignScan: https://scan.sign.global/attestation/{attestationId} (view: https://scan.sign.global/attestation/SPA_ttdldP4FDceNUqIeo_t_s) - PDF: https://sdk.thecertified.xyz/coa/{attestationId}/{edition} (view) (view: https://sdk.thecertified.xyz/coa/SPA_ttdldP4FDceNUqIeo_t_s/1)
- createSignatureAttestation is the function of proving the user's signature, returning a URL to put in "urls" in createAttestation params.
Please refer to the example code available at https://github.com/BuidlerHouse/certified-sdk-example/blob/main/src/components/CertificateForm.js. You need the user to sign the typed data while calling createSignatureAttestation or createAttestation
Both createAttestation and createSignatureAttestation use primaryWallet from dynamic context and will be updated later to support other wallet selectors.
We currently support the following domains for CORS: localhost:3000 and localhost:3001. Kindly inform us if you need to use other domains or local testing domains.