Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: JsDoc typo in DelegationIdentity class's fromDelegation method #951

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions packages/identity/src/identity/delegation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class Delegation {
public readonly pubkey: ArrayBuffer,
public readonly expiration: bigint,
public readonly targets?: Principal[],
) {}
) { }

public toCBOR(): cbor.CborValue {
// Expiration field needs to be encoded as a u64 specifically.
Expand Down Expand Up @@ -205,12 +205,12 @@ export class DelegationChain {
_parseBlob(pubkey),
BigInt('0x' + expiration), // expiration in JSON is an hexa string (See toJSON() below).
targets &&
targets.map((t: unknown) => {
if (typeof t !== 'string') {
throw new Error('Invalid target.');
}
return Principal.fromHex(t);
}),
targets.map((t: unknown) => {
if (typeof t !== 'string') {
throw new Error('Invalid target.');
}
return Principal.fromHex(t);
}),
),
signature: _parseBlob(signature) as Signature,
};
Expand All @@ -234,7 +234,7 @@ export class DelegationChain {
protected constructor(
public readonly delegations: SignedDelegation[],
public readonly publicKey: DerEncodedPublicKey,
) {}
) { }

public toJSON(): JsonnableDelegationChain {
return {
Expand Down Expand Up @@ -266,7 +266,7 @@ export class DelegationChain {
export class DelegationIdentity extends SignIdentity {
/**
* Create a delegation without having access to delegateKey.
* @param key The key used to sign the reqyests.
* @param key The key used to sign the requests.
* @param delegation A delegation object created using `createDelegation`.
*/
public static fromDelegation(
Expand Down
Loading