@celo/wallet-hsm-azure › "azure-hsm-wallet" › AzureHSMWallet
Class: AzureHSMWallet
Hierarchy
- RemoteWallet‹AzureHSMSigner›
↳ AzureHSMWallet
Implements
- ReadOnlyWallet
- ReadOnlyWallet
- ReadOnlyWallet
Index
Constructors
Properties
Methods
- computeSharedSecret
- decrypt
- getAccounts
- getAddressFromKeyName
- hasAccount
- init
- removeAccount
- signPersonalMessage
- signTransaction
- signTypedData
Constructors
constructor
+ new AzureHSMWallet(vaultName
: string): AzureHSMWallet
Defined in wallet-hsm-azure/src/azure-hsm-wallet.ts:12
Parameters:
Name | Type |
---|---|
vaultName |
string |
Returns: AzureHSMWallet
Properties
isSetupFinished
• isSetupFinished: function
Inherited from AzureHSMWallet.isSetupFinished
Defined in wallet-remote/lib/remote-wallet.d.ts:51
Type declaration:
▸ (): boolean
Methods
computeSharedSecret
▸ computeSharedSecret(address
: Address, publicKey
: string): Promise‹Buffer›
Inherited from AzureHSMWallet.computeSharedSecret
Defined in wallet-base/lib/wallet-base.d.ts:64
Computes the shared secret (an ECDH key exchange object) between two accounts
Parameters:
Name | Type |
---|---|
address |
Address |
publicKey |
string |
Returns: Promise‹Buffer›
decrypt
▸ decrypt(address
: string, ciphertext
: Buffer): Promise‹Buffer›
Inherited from AzureHSMWallet.decrypt
Defined in wallet-base/lib/wallet-base.d.ts:60
Parameters:
Name | Type |
---|---|
address |
string |
ciphertext |
Buffer |
Returns: Promise‹Buffer›
getAccounts
▸ getAccounts(): Address[]
Inherited from AzureHSMWallet.getAccounts
Overrides void
Defined in wallet-remote/lib/remote-wallet.d.ts:27
Get a list of accounts in the remote wallet
Returns: Address[]
getAddressFromKeyName
▸ getAddressFromKeyName(keyName
: string): Promise‹Address›
Defined in wallet-hsm-azure/src/azure-hsm-wallet.ts:50
Returns the EVM address for the given key Useful for initially getting the 'from' field given a keyName
Parameters:
Name | Type | Description |
---|---|---|
keyName |
string | Azure KeyVault key name |
Returns: Promise‹Address›
hasAccount
▸ hasAccount(address?
: Address): boolean
Inherited from AzureHSMWallet.hasAccount
Overrides void
Defined in wallet-remote/lib/remote-wallet.d.ts:32
Returns true if account is in the remote wallet
Parameters:
Name | Type | Description |
---|---|---|
address? |
Address | Account to check |
Returns: boolean
init
▸ init(): Promise‹void›
Inherited from AzureHSMWallet.init
Defined in wallet-remote/lib/remote-wallet.d.ts:15
Discovers wallet accounts and caches results in memory Idempotent to ensure multiple calls are benign
Returns: Promise‹void›
removeAccount
▸ removeAccount(_address
: string): void
Inherited from AzureHSMWallet.removeAccount
Defined in wallet-base/lib/wallet-base.d.ts:23
Removes the account with the given address. Needs to be implemented by subclass, otherwise throws error
Parameters:
Name | Type |
---|---|
_address |
string |
Returns: void
signPersonalMessage
▸ signPersonalMessage(address
: Address, data
: string): Promise‹string›
Inherited from AzureHSMWallet.signPersonalMessage
Overrides void
Defined in wallet-remote/lib/remote-wallet.d.ts:43
Parameters:
Name | Type | Description |
---|---|---|
address |
Address | Address of the account to sign with |
data |
string | Hex string message to sign |
Returns: Promise‹string›
Signature hex string (order: rsv)
signTransaction
▸ signTransaction(txParams
: CeloTx): Promise‹EncodedTransaction›
Inherited from AzureHSMWallet.signTransaction
Overrides void
Defined in wallet-remote/lib/remote-wallet.d.ts:37
Signs the EVM transaction using the signer pulled from the from field
Parameters:
Name | Type | Description |
---|---|---|
txParams |
CeloTx | EVM transaction |
Returns: Promise‹EncodedTransaction›
signTypedData
▸ signTypedData(address
: Address, typedData
: EIP712TypedData): Promise‹string›
Inherited from AzureHSMWallet.signTypedData
Overrides void
Defined in wallet-remote/lib/remote-wallet.d.ts:49
Parameters:
Name | Type | Description |
---|---|---|
address |
Address | Address of the account to sign with |
typedData |
EIP712TypedData | the typed data object |
Returns: Promise‹string›
Signature hex string (order: rsv)