1+ import { SiweMessage } from 'siwe' ;
2+ import { Recap } from 'siwe-recap' ;
3+
14import {
25 InvalidArgumentException ,
3- RemovedFunctionError ,
6+ LIT_ABILITY_VALUES ,
47} from '@lit-protocol/constants' ;
5- import depd from 'depd' ;
6- import { SiweMessage } from 'siwe' ;
7- import { Recap } from 'siwe-recap' ;
8- import { LIT_ABILITY_VALUES } from '@lit-protocol/constants' ;
98import { ILitResource , ISessionCapabilityObject } from '@lit-protocol/types' ;
10- import { AttenuationsObject , CID as CIDString } from '../models' ;
9+
1110import { getRecapNamespaceAndAbility } from './utils' ;
11+ import { AttenuationsObject , CID as CIDString } from '../models' ;
1212import { sanitizeSiweMessage } from '../siwe/siwe-helper' ;
1313
14- const deprecated = depd ( 'lit-js-sdk:auth-recap:session-capability-object' ) ;
15-
1614export class RecapSessionCapabilityObject implements ISessionCapabilityObject {
1715 private _inner : Recap ;
1816
@@ -27,15 +25,15 @@ export class RecapSessionCapabilityObject implements ISessionCapabilityObject {
2725 const recap = Recap . decode_urn ( encoded ) ;
2826 return new this (
2927 recap . attenuations ,
30- recap . proofs . map ( ( cid : any ) => cid . toString ( ) )
28+ recap . proofs . map ( ( cid ) => cid . toString ( ) )
3129 ) ;
3230 }
3331
3432 static extract ( siwe : SiweMessage ) : RecapSessionCapabilityObject {
3533 const recap = Recap . extract_and_verify ( siwe ) ;
3634 return new this (
3735 recap . attenuations ,
38- recap . proofs . map ( ( cid : any ) => cid . toString ( ) )
36+ recap . proofs . map ( ( cid ) => cid . toString ( ) )
3937 ) ;
4038 }
4139
@@ -44,7 +42,7 @@ export class RecapSessionCapabilityObject implements ISessionCapabilityObject {
4442 }
4543
4644 get proofs ( ) : Array < CIDString > {
47- return this . _inner . proofs . map ( ( cid : any ) => cid . toString ( ) ) ;
45+ return this . _inner . proofs . map ( ( cid ) => cid . toString ( ) ) ;
4846 }
4947
5048 get statement ( ) : string {
0 commit comments