![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
calimero-auth-sdk
Advanced tools
This SDK is used to generate Calimero Authentication Tokens. These tokens are used to grant the user access to selected Calimero private shard RPC endpoints.
This SDK is used to generate Calimero Authentication Tokens. These tokens are used to grant the user access to selected Calimero private shard RPC endpoints.
Token data is generated based on user account ID and selected Calimero private shard ID, Token data also includes a start and expiry date (maximum duration of a single token is 30 days). This data is sent to My NEAR Wallet to be signed as a message (does not require a blockchain transaction, i.e. it's gas free).
Once the authorization service verifies that user account ID signed the message (containing token data), a Calimero Authorization Token is issued, allowing the user access to the selected Calimero private shard RPC endpoint.
Create CalimeroTokenData
with the required data: accountId
and shardId
. Duration of the token:from
and to
fields are optional and default to Date.now()
and Date.now() + MAX_CALIMERO_TOKEN_DURATION
, respectively.
Serialize the data using calimeroTokenDataInstance.serialize()
and use this as the message
parameter to be signed by My NEAR Wallet.
Store data received from My NEAR Wallet in a WalletData
instance.
Create a CalimeroToken
with WalletData
and CalimeroTokenData
instances: calimeroToken = new CalimeroToken(walletData, calimeroTokenData
.
Verify the signed message by calling calimeroToken.verify()
. This will check both is the token is valid with respect to Date.now()
and if the signature matches the public key of the user account ID.
Access to the Calimero private shard RPC endpoint should be given to tokens which return true
from calimeroToken.verify()
.
FAQs
Javascript library to interact with Calimero private shards
The npm package calimero-auth-sdk receives a total of 18 weekly downloads. As such, calimero-auth-sdk popularity was classified as not popular.
We found that calimero-auth-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.