Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dfinity/identity

Package Overview
Dependencies
Maintainers
11
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dfinity/identity - npm Package Compare versions

Comparing version 0.8.4 to 0.8.5

4

lib/cjs/identity/webauthn.d.ts

@@ -22,5 +22,5 @@ import { BinaryBlob, DerEncodedBlob, PublicKey, SignIdentity } from '@dfinity/agent';

* Create an identity.
* @param challenge an optional PublicKeyCredentialCreationOptions Challenge
* @param credentialCreationOptions an optional CredentialCreationOptions Challenge
*/
static create(challenge?: PublicKeyCredentialCreationOptions['challenge']): Promise<WebAuthnIdentity>;
static create(credentialCreationOptions: CredentialCreationOptions): Promise<WebAuthnIdentity>;
protected _publicKey: CosePublicKey;

@@ -27,0 +27,0 @@ protected constructor(rawId: BinaryBlob, cose: BinaryBlob);

@@ -99,6 +99,6 @@ "use strict";

* it, so we don't.
* @param challenge an optional PublicKeyCredentialCreationOptions Challenge
* @param credentialCreationOptions an optional CredentialCreationOptions object
*/
async function _createCredential(challenge) {
const creds = (await navigator.credentials.create({
async function _createCredential(credentialCreationOptions) {
const creds = (await navigator.credentials.create(credentialCreationOptions !== null && credentialCreationOptions !== void 0 ? credentialCreationOptions : {
publicKey: {

@@ -109,11 +109,11 @@ authenticatorSelection: {

attestation: 'direct',
challenge: challenge !== null && challenge !== void 0 ? challenge : _createChallengeBuffer(),
challenge: _createChallengeBuffer(),
pubKeyCredParams: [{ type: 'public-key', alg: PubKeyCoseAlgo.ECDSA_WITH_SHA256 }],
rp: {
name: 'ic0.app',
name: 'Internet Identity Service',
},
user: {
id: tweetnacl.randomBytes(16),
name: 'ic0 user',
displayName: 'ic0 user',
name: 'Internet Identity',
displayName: 'Internet Identity',
},

@@ -160,6 +160,6 @@ },

* Create an identity.
* @param challenge an optional PublicKeyCredentialCreationOptions Challenge
* @param credentialCreationOptions an optional CredentialCreationOptions Challenge
*/
static async create(challenge) {
const creds = await _createCredential(challenge);
static async create(credentialCreationOptions) {
const creds = await _createCredential(credentialCreationOptions);
if (!creds || creds.type !== 'public-key') {

@@ -166,0 +166,0 @@ throw new Error('Could not create credentials.');

@@ -22,5 +22,5 @@ import { BinaryBlob, DerEncodedBlob, PublicKey, SignIdentity } from '@dfinity/agent';

* Create an identity.
* @param challenge an optional PublicKeyCredentialCreationOptions Challenge
* @param credentialCreationOptions an optional CredentialCreationOptions Challenge
*/
static create(challenge?: PublicKeyCredentialCreationOptions['challenge']): Promise<WebAuthnIdentity>;
static create(credentialCreationOptions: CredentialCreationOptions): Promise<WebAuthnIdentity>;
protected _publicKey: CosePublicKey;

@@ -27,0 +27,0 @@ protected constructor(rawId: BinaryBlob, cose: BinaryBlob);

@@ -73,6 +73,6 @@ import { blobFromHex, blobFromUint8Array, derBlobFromBlob, SignIdentity, } from '@dfinity/agent';

* it, so we don't.
* @param challenge an optional PublicKeyCredentialCreationOptions Challenge
* @param credentialCreationOptions an optional CredentialCreationOptions object
*/
async function _createCredential(challenge) {
const creds = (await navigator.credentials.create({
async function _createCredential(credentialCreationOptions) {
const creds = (await navigator.credentials.create(credentialCreationOptions !== null && credentialCreationOptions !== void 0 ? credentialCreationOptions : {
publicKey: {

@@ -83,11 +83,11 @@ authenticatorSelection: {

attestation: 'direct',
challenge: challenge !== null && challenge !== void 0 ? challenge : _createChallengeBuffer(),
challenge: _createChallengeBuffer(),
pubKeyCredParams: [{ type: 'public-key', alg: PubKeyCoseAlgo.ECDSA_WITH_SHA256 }],
rp: {
name: 'ic0.app',
name: 'Internet Identity Service',
},
user: {
id: tweetnacl.randomBytes(16),
name: 'ic0 user',
displayName: 'ic0 user',
name: 'Internet Identity',
displayName: 'Internet Identity',
},

@@ -134,6 +134,6 @@ },

* Create an identity.
* @param challenge an optional PublicKeyCredentialCreationOptions Challenge
* @param credentialCreationOptions an optional CredentialCreationOptions Challenge
*/
static async create(challenge) {
const creds = await _createCredential(challenge);
static async create(credentialCreationOptions) {
const creds = await _createCredential(credentialCreationOptions);
if (!creds || creds.type !== 'public-key') {

@@ -140,0 +140,0 @@ throw new Error('Could not create credentials.');

{
"name": "@dfinity/identity",
"version": "0.8.4",
"version": "0.8.5",
"author": "DFINITY Stiftung <sdk@dfinity.org>",

@@ -42,3 +42,3 @@ "license": "Apache-2.0",

"dependencies": {
"@dfinity/agent": "^0.8.4",
"@dfinity/agent": "^0.8.5",
"borc": "^2.1.1",

@@ -45,0 +45,0 @@ "buffer": "^5.4.3",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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