This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn verify_signature( | |
&self, | |
caller: &ManagedAddress, | |
url: &ManagedBuffer, | |
signature: &Signature<Self::Api>, | |
) { | |
let mut data = ManagedBuffer::new(); | |
data.append(caller.as_managed_buffer()); | |
data.append(url); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { BadRequestException, Body, Controller, Post, UseGuards } from '@nestjs/common'; | |
import { ApiTags } from '@nestjs/swagger'; | |
import { CachingService } from '../../common/caching/caching.service'; | |
import { randomBytes } from 'crypto'; | |
import { Constants } from '../../utils/constants'; | |
import { JwtService } from '@nestjs/jwt'; | |
import { LoginDto } from './dto/login.dto'; | |
import { Address, SignableMessage, UserPublicKey } from '@elrondnetwork/erdjs/out'; | |
import { ThrottlerBehindProxyGuard } from '../../common/throttle/throttle.guard'; |