NvmAccount
@nevermined-io/sdk - v3.0.40 / NvmAccount
Class: NvmAccount
Account information.
Table of contents
Constructors
Properties
Methods
- getAccountSigner
- getAddress
- getId
- getKernelClient
- getPassword
- getPublic
- getType
- getZeroDevSigner
- isZeroDev
- setId
- setPassword
- signTextLocally
- fromAccount
- fromAddress
- fromZeroDevSessionKey
- fromZeroDevSigner
Constructors
constructor
• new NvmAccount(id
, accountType?
): NvmAccount
Parameters
Name | Type |
---|---|
id | string |
accountType | NvmAccountType |
Returns
Defined in
Properties
accountSigner
• Private
Optional
accountSigner: Account
| PrivateKeyAccount
Defined in
accountType
• accountType: NvmAccountType
Defined in
babySecret
• Optional
babySecret: string
Defined in
babyX
• Optional
babyX: string
Defined in
babyY
• Optional
babyY: string
Defined in
id
• Private
id: string
Defined in
kernelClient
• Private
Optional
kernelClient: KernelAccountClient
\<"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
, Transport
, Chain
, any
>
Defined in
password
• Private
Optional
password: string
Defined in
zeroDevSigner
• Private
Optional
zeroDevSigner: any
Defined in
Methods
getAccountSigner
▸ getAccountSigner(): any
Returns
any
Defined in
getAddress
▸ getAddress(): `0x${string}`
Returns
`0x${string}`
Defined in
getId
▸ getId(): `0x${string}`
Returns
`0x${string}`
Defined in
getKernelClient
▸ getKernelClient(): undefined
| KernelAccountClient
\<"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
, Transport
, Chain
, any
>
Returns
undefined
| KernelAccountClient
\<"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
, Transport
, Chain
, any
>
Defined in
getPassword
▸ getPassword(): undefined
| string
Returns account password.
Returns
undefined
| string
The account password.
Defined in
getPublic
▸ getPublic(): string
Returns
string
Defined in
getType
▸ getType(): "local"
| "json-rpc"
| "zerodev"
| "sessionKey"
Returns
"local"
| "json-rpc"
| "zerodev"
| "sessionKey"
Defined in
getZeroDevSigner
▸ getZeroDevSigner(): any
Returns
any
Defined in
isZeroDev
▸ isZeroDev(): boolean
Returns
boolean
Defined in
setId
▸ setId(id
): void
Parameters
Name | Type |
---|---|
id | string |
Returns
void
Defined in
setPassword
▸ setPassword(password
): void
Set account password.
Parameters
Name | Type | Description |
---|---|---|
password | string | Password for account. |
Returns
void
Defined in
signTextLocally
▸ signTextLocally(text
): Promise
\<`0x${string}`>
Parameters
Name | Type |
---|---|
text | string | Uint8Array |
Returns
Promise
\<`0x${string}`>
Defined in
fromAccount
▸ fromAccount(account
): NvmAccount
Returns a nevermined Account from a viem account
Parameters
Name | Type | Description |
---|---|---|
account | Account | PrivateKeyAccount | A viem local account |
Returns
The nevermined account
Defined in
fromAddress
▸ fromAddress(address
): NvmAccount
Returns a nevermined Account from an address. This method is used for browser integration (i.e Metamask)
Parameters
Name | Type | Description |
---|---|---|
address | `0x${string}` | A wallet address |
Returns
The nevermined account
Defined in
fromZeroDevSessionKey
▸ fromZeroDevSessionKey(kernelClient
): NvmAccount
Parameters
Name | Type |
---|---|
kernelClient | KernelAccountClient \<"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789" , Transport , Chain , any > |
Returns
Defined in
fromZeroDevSigner
▸ fromZeroDevSigner(kernelClient
): Promise
\<NvmAccount
>
Returns a nevermined Account from a zerodev signer
Parameters
Name | Type |
---|---|
kernelClient | KernelAccountClient \<"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789" , Transport , Chain , any > |
Returns
Promise
\<NvmAccount
>
The nevermined account