@dfinity/auth-client
Advanced tools
Comparing version 0.9.3 to 0.10.0-beta.1
@@ -5,3 +5,2 @@ "use strict"; | ||
const agent_1 = require("@dfinity/agent"); | ||
const candid_1 = require("@dfinity/candid"); | ||
const authentication_1 = require("@dfinity/authentication"); | ||
@@ -113,7 +112,7 @@ const identity_1 = require("@dfinity/identity"); | ||
return { | ||
delegation: new identity_1.Delegation(candid_1.blobFromUint8Array(signedDelegation.delegation.pubkey), signedDelegation.delegation.expiration, signedDelegation.delegation.targets), | ||
signature: candid_1.blobFromUint8Array(signedDelegation.signature), | ||
delegation: new identity_1.Delegation(signedDelegation.delegation.pubkey, signedDelegation.delegation.expiration, signedDelegation.delegation.targets), | ||
signature: signedDelegation.signature.buffer, | ||
}; | ||
}); | ||
const delegationChain = identity_1.DelegationChain.fromDelegations(delegations, candid_1.derBlobFromBlob(candid_1.blobFromUint8Array(message.userPublicKey))); | ||
const delegationChain = identity_1.DelegationChain.fromDelegations(delegations, message.userPublicKey.buffer); | ||
const key = this._key; | ||
@@ -170,3 +169,3 @@ if (!key) { | ||
kind: 'authorize-client', | ||
sessionPublicKey: (_a = this._key) === null || _a === void 0 ? void 0 : _a.getPublicKey().toDer(), | ||
sessionPublicKey: new Uint8Array((_a = this._key) === null || _a === void 0 ? void 0 : _a.getPublicKey().toDer()), | ||
maxTimeToLive: options === null || options === void 0 ? void 0 : options.maxTimeToLive, | ||
@@ -173,0 +172,0 @@ }; |
@@ -1,3 +0,2 @@ | ||
import { AnonymousIdentity } from '@dfinity/agent'; | ||
import { blobFromUint8Array, derBlobFromBlob } from '@dfinity/candid'; | ||
import { AnonymousIdentity, } from '@dfinity/agent'; | ||
import { isDelegationValid } from '@dfinity/authentication'; | ||
@@ -108,7 +107,7 @@ import { Delegation, DelegationChain, DelegationIdentity, Ed25519KeyIdentity, } from '@dfinity/identity'; | ||
return { | ||
delegation: new Delegation(blobFromUint8Array(signedDelegation.delegation.pubkey), signedDelegation.delegation.expiration, signedDelegation.delegation.targets), | ||
signature: blobFromUint8Array(signedDelegation.signature), | ||
delegation: new Delegation(signedDelegation.delegation.pubkey, signedDelegation.delegation.expiration, signedDelegation.delegation.targets), | ||
signature: signedDelegation.signature.buffer, | ||
}; | ||
}); | ||
const delegationChain = DelegationChain.fromDelegations(delegations, derBlobFromBlob(blobFromUint8Array(message.userPublicKey))); | ||
const delegationChain = DelegationChain.fromDelegations(delegations, message.userPublicKey.buffer); | ||
const key = this._key; | ||
@@ -165,3 +164,3 @@ if (!key) { | ||
kind: 'authorize-client', | ||
sessionPublicKey: (_a = this._key) === null || _a === void 0 ? void 0 : _a.getPublicKey().toDer(), | ||
sessionPublicKey: new Uint8Array((_a = this._key) === null || _a === void 0 ? void 0 : _a.getPublicKey().toDer()), | ||
maxTimeToLive: options === null || options === void 0 ? void 0 : options.maxTimeToLive, | ||
@@ -168,0 +167,0 @@ }; |
{ | ||
"name": "@dfinity/auth-client", | ||
"version": "0.9.3", | ||
"version": "0.10.0-beta.1", | ||
"author": "DFINITY Stiftung <sdk@dfinity.org>", | ||
@@ -40,6 +40,6 @@ "license": "Apache-2.0", | ||
"peerDependencies": { | ||
"@dfinity/agent": "^0.9.3", | ||
"@dfinity/authentication": "^0.9.3", | ||
"@dfinity/identity": "^0.9.3", | ||
"@dfinity/principal": "^0.9.3" | ||
"@dfinity/agent": "^0.10.0-beta.1", | ||
"@dfinity/authentication": "^0.10.0-beta.1", | ||
"@dfinity/identity": "^0.10.0-beta.1", | ||
"@dfinity/principal": "^0.10.0-beta.1" | ||
}, | ||
@@ -46,0 +46,0 @@ "devDependencies": { |
declare module 'borc' { | ||
import { Buffer } from 'buffer/'; | ||
class Decoder { | ||
@@ -5,0 +3,0 @@ constructor(opts: { size: number; tags: Record<number, (val: any) => any> }); |
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
230376
634