Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@arianee/arianee-access-token
Advanced tools
The ArianeeAccessToken class is a module that allows you to create and manage Arianee Access Tokens (AAT). This class requires the Core class from the @arianee/core module
Readme
The ArianeeAccessToken class is a module that allows you to create and manage Arianee Access Tokens (AAT). This class requires the Core class from the @arianee/core module
You need to instanciate the class with a core instance and a wallet address.
const core = core.fromPrivateKey('0x...');
const arianeeAccessToken = new ArianeeAccessToken(core);
Then you can use the following methods:
createWalletAccessToken(): Promise<string>
This method generates an Arianee Access Token (AAT) for the wallet scope. It returns a Promise
that resolves to the AAT as a string
.
createCertificateArianeeAccessToken(certificateId: number, network: string): Promise<string>
This method generates an Arianee Access Token (AAT) for the certificate scope. It takes two parameters: certificateId
, which is the ID of the certificate, and network
, which is the name of the Arianee network. It returns a Promise
that resolves to the AAT as a string
.
createActionArianeeAccessTokenLink(url: string, certificateId: number, network: string): Promise<string>
This method creates a link with an Arianee Access Token (AAT) attached to it. It takes three parameters: url
, which is the URL to attach the AAT to, certificateId
, which is the ID of the certificate, and network
, which is the name of the Arianee network. It returns a Promise
that resolves to the link with the AAT as a string
.
If you only need to decode existing arianee access token, you don't need to instanciate the class.
You can use the following static methods
static isArianeeAccessTokenValid(arianeeAccessToken: string): boolean
This static method checks if an Arianee Access Token (AAT) is valid. It takes an arianeeAccessToken
parameter as a string
and returns a boolean
indicating whether the AAT is valid or not.
static decodeJwt(arianeeAccessToken: string): {header: JwtHeaderInterface, payload: ArianeeAccessTokenPayload, signature: string}
This static method decodes an Arianee Access Token (AAT). It takes an arianeeAccessToken
parameter as a string
and returns an object with the decoded AAT, containing the header, payload, and signature.
FAQs
The ArianeeAccessToken class is a module that allows you to create and manage Arianee Access Tokens (AAT). This class requires the Core class from the @arianee/core module
The npm package @arianee/arianee-access-token receives a total of 194 weekly downloads. As such, @arianee/arianee-access-token popularity was classified as not popular.
We found that @arianee/arianee-access-token demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.