![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
@automata-network/2fa-guru-sdk
Advanced tools
The 2FA Guru SDK is a JavaScript library for developers to seamlessly interact with smart contracts that have extended 2FA functionalities.
Implementation smart contracts must inherit the TwoFactorBase
contract. The TwoFactorBase
contract includes the following administrative methods:
twoFactorAuthenticator
to our authenticator contract address.enabled2FAProtection
and disable2FAProtection
methods.only2FA
modifier. Functions with the modifier on a contract can only be called with a signature prepared by the geode upon successful verification (sending a correct 6 digit code)TwoFactorBase
:The main module has the following functions built-in:
signupFor2fa
- Generates a secret for authenticator apps such as Google to generate a six digit verification code during 2fa sign up.
confirmSignupFor2fa
- Uses the six digit verification code to store the wallet-secret pair in the geode.
reset2fa
- Generates a secret for authenticator apps such as Google to generate a six digit verification code during 2fa reset.
confirmReset2fa
- Uses the six digit verification code to reset the wallet-secret pair in the geode.
addRecoveryWallet
- Bind a recovery wallet to your primary wallet on chain. A recovery wallet will be used for the reset of 2fa.
disable2fa
- Disable the 2fa for your connected primary wallet. There will be a cooldown period before disabling the 2fa.
cancel2faCooldown
- Cancels the cooldown period before disabling of 2fa.
check2fa
- Returns a signature for contract calls from geode if verification code is valid
executeTxnCall
- Execute a low lvl call to the blockchain. Used with the signature generated from check2fa()
get2faInfo
- Get info the binding expiry, disable 2fa cooldown and whether 2fa has been created for the wallet
getRecoveryWallet
- Retrieve the recovery wallet of a primary wallet. 0x0 is returned if no recovery wallet is present.
getWalletNonce
- Retrieve the nonce of a wallet address
https://github.com/automata-network/2fa-guru-sdk
Prerequisite
Install the SDK by running:
yarn add @automata-network/2fa-guru-sdk
Instantiate the module with a provider, authenticator contract and your own project contract
import { TwoFAGuru } from '@automata-network/2fa-guru-sdk';
const twoFAGuru = new TwoFAGuru(_provider, _authenticatorContract, _tokenContract)
`_provider` - The provider in which the module will use for blockchain calls
`_authenticatorContract` - Our authenticator contract address
`_tokenContract` - Your project contract address that has implemented TwoFactorBase.sol
FAQs
A SDK for easy integration with 2FA Guru
The npm package @automata-network/2fa-guru-sdk receives a total of 5 weekly downloads. As such, @automata-network/2fa-guru-sdk popularity was classified as not popular.
We found that @automata-network/2fa-guru-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.