New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

anchor-link

Package Overview
Dependencies
Maintainers
2
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anchor-link - npm Package Compare versions

Comparing version 3.5.0 to 3.5.1

2

lib/anchor-link.d.ts
/**
* Anchor Link v3.5.0
* Anchor Link v3.5.1
* https://github.com/greymass/anchor-link

@@ -4,0 +4,0 @@ *

/**
* Anchor Link v3.5.0
* Anchor Link v3.5.1
* https://github.com/greymass/anchor-link

@@ -1198,3 +1198,3 @@ *

/** Package version. */
Link.version = '3.5.0'; // eslint-disable-line @typescript-eslint/no-inferrable-types
Link.version = '3.5.1'; // eslint-disable-line @typescript-eslint/no-inferrable-types
/**

@@ -1201,0 +1201,0 @@ * Format a EOSIO permission level in the format `actor@permission` taking placeholders into consideration.

/**
* Anchor Link v3.5.0
* Anchor Link v3.5.1
* https://github.com/greymass/anchor-link

@@ -1168,3 +1168,3 @@ *

/** Package version. */
Link.version = '3.5.0'; // eslint-disable-line @typescript-eslint/no-inferrable-types
Link.version = '3.5.1'; // eslint-disable-line @typescript-eslint/no-inferrable-types
/**

@@ -1171,0 +1171,0 @@ * Format a EOSIO permission level in the format `actor@permission` taking placeholders into consideration.

{
"name": "anchor-link",
"version": "3.5.0",
"version": "3.5.1",
"description": "Library for authenticating and signing transactions using the Anchor Link protocol",

@@ -5,0 +5,0 @@ "license": "BSD-3-Clause",

@@ -6,22 +6,26 @@ # Anchor Link [![Package Version](https://img.shields.io/npm/v/anchor-link.svg?style=flat-square)](https://www.npmjs.com/package/anchor-link) ![License](https://img.shields.io/npm/l/anchor-link.svg?style=flat-square)

Key features:
- Persistent account sessions
- End-to-end encryption (E2EE)
- Account-based identity proofs
- Cross-device signing
- Network resource management
- Open standard
- Persistent account sessions
- End-to-end encryption (E2EE)
- Account-based identity proofs
- Cross-device signing
- Network resource management
- Open standard
Resources:
- [API Documentation](https://greymass.github.io/anchor-link)
- [Protocol Specification](./protocol.md)
- [Developer Chat (Telegram)](https://t.me/anchor_link)
- [API Documentation](https://greymass.github.io/anchor-link)
- [Protocol Specification](./protocol.md)
- [Developer Chat (Telegram)](https://t.me/anchor_link)
Guides:
- [Integrating an app with Anchor using anchor-link](https://forums.greymass.com/t/integrating-an-app-with-anchor-using-anchor-link/165)
- [Integrating an app with Anchor using anchor-link](https://forums.eoscommunity.org/t/integrating-an-app-with-anchor-using-anchor-link/165)
Examples:
- [Simple Examples](./examples)
- [VueJS Demo Application](https://github.com/greymass/anchor-link-demo)
- [ReactJS Demo Application](https://github.com/greymass/anchor-link-demo-multipass)
- [Simple Examples](./examples)
- [VueJS Demo Application](https://github.com/greymass/anchor-link-demo)
- [ReactJS Demo Application](https://github.com/greymass/anchor-link-demo-multipass)
## Installation

@@ -88,3 +92,3 @@

nodeUrl: 'https://eos.greymass.com',
}
},
],

@@ -94,7 +98,7 @@ })

Now you have a link instance that can be used in the browser to login and/or transact. See [options](https://greymass.github.io/anchor-link/interfaces/linkoptions.html) for a full list of available options. Also refer to the [anchor-link-browser-transport](https://github.com/greymass/anchor-link-browser-transport/tree/master#basic-usage) README for a list of available options within the transport.
Now you have a link instance that can be used in the browser to login and/or transact. See [options](https://greymass.github.io/anchor-link/interfaces/LinkOptions.html) for a full list of available options. Also refer to the [anchor-link-browser-transport](https://github.com/greymass/anchor-link-browser-transport/tree/master#basic-usage) README for a list of available options within the transport.
### Create a user session
To create a persistent session where you can push multiple transaction to a users wallet you need to call the [login](https://greymass.github.io/anchor-link/classes/link.html#login) method on your link instance and pass your application name.
To create a persistent session where you can push multiple transaction to a users wallet you need to call the [login](https://greymass.github.io/anchor-link/classes/Link.html#login) method on your link instance and pass your application name.

@@ -112,3 +116,3 @@ ```ts

Using the session you have persisted within your applications state from the user login, you can now send transactions through the session to the users wallet using the [transact](https://greymass.github.io/anchor-link/classes/link.html#transact) method.
Using the session you have persisted within your applications state from the user login, you can now send transactions through the session to the users wallet using the [transact](https://greymass.github.io/anchor-link/classes/Link.html#transact) method.

@@ -134,6 +138,6 @@ ```ts

If a user has previously logged in to your application, you can restore that previous session by calling the [restoreSession](https://greymass.github.io/anchor-link/classes/link.html#restoresession) method on your link instance.
If a user has previously logged in to your application, you can restore that previous session by calling the [restoreSession](https://greymass.github.io/anchor-link/classes/Link.html#restoresession) method on your link instance.
```ts
link.restoreSession('mydapp').then(({session}) => {
link.restoreSession('mydapp').then((session) => {
console.log(`Session for ${session.auth} restored`)

@@ -158,10 +162,10 @@ const action = {

A full list of all methods can be found in the [Link class documentation](https://greymass.github.io/anchor-link/classes/link.html).
A full list of all methods can be found in the [Link class documentation](https://greymass.github.io/anchor-link/classes/Link.html).
- List all available sessions: [listSessions](https://greymass.github.io/anchor-link/classes/link.html#listsessions)
- Removing a session: [removeSession](https://greymass.github.io/anchor-link/classes/link.html#removesession)
- List all available sessions: [listSessions](https://greymass.github.io/anchor-link/classes/Link.html#listsessions)
- Removing a session: [removeSession](https://greymass.github.io/anchor-link/classes/Link.html#removesession)
### One-shot transact
To sign action(s) or a transaction using the link without logging in you can call the [transact](https://greymass.github.io/anchor-link/classes/link.html#transact) method on your link instance.
To sign action(s) or a transaction using the link without logging in you can call the [transact](https://greymass.github.io/anchor-link/classes/Link.html#transact) method on your link instance.

@@ -191,3 +195,3 @@ ```ts

You can find more examples in the [examples directory](./examples) at the root of this repository and don't forget to look at the [API documentation](https://greymass.github.io/anchor-link/classes/link.html).
You can find more examples in the [examples directory](./examples) at the root of this repository and don't forget to look at the [API documentation](https://greymass.github.io/anchor-link/classes/Link.html).

@@ -200,8 +204,8 @@ ## Transports

Package | Description
---------| ---------------
[anchor-link-browser-transport](https://github.com/greymass/anchor-link-browser-transport) | Browser overlay that generates QR codes or triggers local URI handler if available
[anchor-link-console-transport](https://github.com/greymass/anchor-link-console-transport) | Transport that prints ASCII QR codes and esr:// links to the JavaScript console
| Package | Description |
| ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |
| [anchor-link-browser-transport](https://github.com/greymass/anchor-link-browser-transport) | Browser overlay that generates QR codes or triggers local URI handler if available |
| [anchor-link-console-transport](https://github.com/greymass/anchor-link-console-transport) | Transport that prints ASCII QR codes and esr:// links to the JavaScript console |
See the [`LinkTransport` documentation](https://greymass.github.io/anchor-link/interfaces/linktransport.html) for details on how to implement custom transports.
See the [`LinkTransport` documentation](https://greymass.github.io/anchor-link/interfaces/LinkTransport.html) for details on how to implement custom transports.

@@ -208,0 +212,0 @@ ## Protocol

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc