Methods
Human Wallet implements the EIP-1193 request
method, which covers most common use cases. For additional features, it implements additional methods below:
// --- Methods exported from "@silk-wallet/silk-wallet-sdk" ---
/**
* @param [referralCode] - Human Wallet points referral code
*/
initHuman Wallet(referralCode?: string): SilkProvider
// --- Methods on SilkProvider ---
interface SilkProvider {
/**
* Open the Human Wallet login modal (without other wallet options).
* Returns null if the user logs in.
* Throws an error if the user exits without logging in.
*/
login(): Promise<null>
/**
* Open the Human Wallet login modal (with other wallet options).
* Returns a string denoting the wallet selected by the user.
* Throws an error if the user exits without logging in.
* @param [injectedProvider] - window.ethereum. The text for the button for the
* injected wallet in the login modal changes based on which wallet this is.
*/
loginSelector(injectedProvider?: EthereumProvider): Promise<'Human Wallet' | 'injected' | 'walletconnect'>
/**
* Request the user's email address.
*/
requestEmail(): Promise<string>
/**
* Prompt the user to mint a Zeronym SBT.
* Returns the user's address if they successfully mint the SBT, null if
* they have already minted before.
* Throws an error if the user exits before minting.
*/
requestSBT(type: 'kyc' | 'phone'): Promise<string | null>
/**
* This function is implemented as described in EIP-1193
* (https://eips.ethereum.org/EIPS/eip-1193#request).
*/
request(args: { method: string, params?: unknown[] | object }): Promise<unknown>
}
Method Details​
login
​
This method triggers the login/signup flow in the Human Wallet modal.

loginSelector
​
The loginSelector method opens the Human Wallet modal to display wallet options with which to sign transactions as alternatives to Human Wallet. This provides more flexibility for application developers with audiences who might already be familiar with web3 infrastructure and have existing wallets.

requestEmail
​
By calling the requestEmail function, the Human Wallet modal asks users to consent to sharing their verified email address with the application. By relying on the same email that Human Wallet users verify on every Human Wallet login, applications can opt to skip their own implementation of user email verification.

requestSBT
​
Calling requestSBT opens the user flow for a specific Proof of Identity to be completed and mint a soul-bound token. The method returns with the user's address if successfully completed. Currently supported parameters to pass to this function are "phone
" and "kyc
".
request
​
The request function is a direct implementation of the EIP-1193 Ethereum Provider JavaScript API. This allows developers and 3rd-party tools to treat Human Wallet as a 1193-compliant EVM wallet, e.g. to list it alongside other wallets.