@celo/wallet-hsm-aws › "aws-hsm-wallet" › AwsHsmWallet
Class: AwsHsmWallet
A Cloud HSM wallet built on AWS KMS https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/KMS.html When using the default credentials, it's expected to set the aws_access_key_id and aws_secret_access_key in ~/.aws/credentials
Hierarchy
- RemoteWallet‹AwsHsmSigner›
↳ AwsHsmWallet
Implements
- ReadOnlyWallet
- ReadOnlyWallet
- ReadOnlyWallet
Index
Constructors
Properties
Methods
- computeSharedSecret
- decrypt
- getAccounts
- getAddressFromKeyId
- hasAccount
- init
- removeAccount
- signPersonalMessage
- signTransaction
- signTypedData
Constructors
constructor
+ new AwsHsmWallet(awsCredentials?
: KMS.ClientConfiguration): AwsHsmWallet
Defined in wallet-hsm-aws/src/aws-hsm-wallet.ts:31
Parameters:
Name | Type |
---|---|
awsCredentials? |
KMS.ClientConfiguration |
Returns: AwsHsmWallet
Properties
isSetupFinished
• isSetupFinished: function
Inherited from AwsHsmWallet.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 AwsHsmWallet.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 AwsHsmWallet.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 AwsHsmWallet.getAccounts
Overrides void
Defined in wallet-remote/lib/remote-wallet.d.ts:27
Get a list of accounts in the remote wallet
Returns: Address[]
getAddressFromKeyId
▸ getAddressFromKeyId(keyId
: string): Promise‹Address›
Defined in wallet-hsm-aws/src/aws-hsm-wallet.ts:92
Returns the EVM address for the given key Useful for initially getting the 'from' field given a keyName
Parameters:
Name | Type |
---|---|
keyId |
string |
Returns: Promise‹Address›
hasAccount
▸ hasAccount(address?
: Address): boolean
Inherited from AwsHsmWallet.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 AwsHsmWallet.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 AwsHsmWallet.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 AwsHsmWallet.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 AwsHsmWallet.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 AwsHsmWallet.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)