Is it possible to sign multiple messages using MetaMask all at once? - ethereum

I have 100 messages that I want to sign using metamask. Is there a way to sign them all at once
I've tried Batchrequest using web3 js but the Metamask ask the user to sign messages one by one

It's not. You cannot sign multiple messages with MetaMask.

Related

Using connected wallet to authenticate endpoint for dApp?

I have a pure Typescript dApp that has no server behind it. The user connects their MetaMask wallet and mints an NFT from the site. I want to provide an affiliate program so partners can give out their affiliate link and anyone who purchases an NFT they will get a percentage fee.
If the affiliate identifier is in the query string parameters, I will write it to the user's cookie. Then I can call an endpoint with the user's public wallet address and transaction identifier when they complete the mint. Or if they leave and come back, the affiliate id is in the cookie to pick up from there.
My challenge is how can I authenticate that endpoint if the dApp is pure javascript with no server behind it? What can stop anyone from just calling this endpoint with a bunch of wallets and affiliate codes?
Could there be a way to use the user's connected wallet to sign a message and authenticate with the endpoint that way? It would almost be like OAuth but for crypto. I want to keep this simple though.
Any suggestions or ideas on how to achieve this?
My challenge is how can I authenticate that endpoint if the dApp is pure javascript with no server behind it? What can stop anyone from just calling this endpoint with a bunch of wallets and affiliate codes?
Usually you don't. You can pass the information in the mint transaction.
My challenge is how can I authenticate that endpoint if the dApp is pure javascript with no server behind it? What can stop anyone from just calling this endpoint with a bunch of wallets and affiliate codes?
You can make users to sign in to your service using Ethereum Sign In. This needs a backend, though. You are not going to get more information than in the mint transaction (the user address).

Can NFT be used for authentication on web apps

Can NFT's be used as a mean of authentication? The scenario is a user buys an NFT (ERC721) now he visits the site that uses this Token for authentication, so am guessing the web3.js on the site checks the users wallet if he has the token in wallet then can access the site....but what about server side calls...the server can check the ledger to see who owns the token, but how can it know if the person making the call is the owner..address can be spoofed so sending it with call is out of question. Also the case if users sells his token now a new user owns it
Am thinking something like digital signature but how to get the owners public key and is requiring users to sign messages a hassle...am noob to solidity what do I know but SO requires me to try to answer my question before asking for an answer also some code a requirement for every posts
pragma solidity ^0.4.22;contract helloWorld {
function renderHelloWorld () public pure returns (string) {
return 'helloWorld';
}
}
Checking that the viewer has an address that owns the token is not enough. You would need to confirm that the viewer controls the address by asking them to sign a message.
One system like this is called MetaKey.
If you want to coordinate sessions with a backend, you need to do additional work because the NFT could be transferred. You would need to revoke the session key when the NFT is transferred, which requires that you monitor the blockchain for transfer events.
I don't recommend building sign in infrastructure around an NFTs though. It will be extremely difficult or impossible to avoid security flaws. Better to authenticate people using a wallet signature. There are many tutorials online for building this flow, for example here.

How can I get MetaMask to use the corresponding token to display balances?

I've noticed that anytime I want to test some token, I have to go into MetaMask and a load in the custom address off of etherscan, rather than using the provided tokens found within MetaMask. The picture above shows Dai (with the two Dai labels: the one provided by MetaMask and the one coming from the custom Dai address) within Rinkeby. However, this has been an issue for me whether it was dealing with other ERC20 tokens such as LINK or other networks (e.g. Ropsten and Kovan).
Could I be doing something incorrect when sending tokens? Are the provided token labels just for Mainnet?

Sign raw transactions in Logic Apps

I'm new to Logic Apps. What I would like to achieve is to sign and send raw transactions to Ethereum network using Logic Apps service. Currently, what I have done is to transfer ERC20 tokens from the token contract itself in Logic Apps.
What I would like to achieve is to transfer tokens from account to account which is the transfer from the method the ERC20 protocol.
How can I do that in Logic Apps? In my opinion, it's required the sender to sign the raw transaction message.
While I am not familiar with ERC20, since you seem to be using web3py, I believe you can offload the signing to an Python Azure Function which you can invoke from within a Logic App.
As for signing a transaction, looks like this is covered in the web3py docs.

Get Emails from Multiple Inboxes using EWS Managed API 2.2

Is it possible to retrieve emails from multiple inboxes using EWS Managed API 2.2? I am able to retrieve email from an Inbox using ExchangeService passing in Credentials to the service call then doing a FindItems on the service connection. All of this works good.
I would like to get emails from multiple inboxes using a single call. Is this possible. Any sample code would be very much appreciated.
You can acces EWS through either Oauth, NTLM or Basic-authentication, which all are per-request authentication schemes. Oauth takes some initial setup, and NTLM takes 3 requests in total for every EWS request, but in either way, it's just for one user at a time.