Skip to main content

NvmAccount

@nevermined-io/sdk - v3.0.40 / NvmAccount

Class: NvmAccount

Account information.

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new NvmAccount(id, accountType?): NvmAccount

Parameters

NameType
idstring
accountTypeNvmAccountType

Returns

NvmAccount

Defined in

src/models/NvmAccount.ts:86

Properties

accountSigner

Private Optional accountSigner: Account | PrivateKeyAccount

Defined in

src/models/NvmAccount.ts:15


accountType

accountType: NvmAccountType

Defined in

src/models/NvmAccount.ts:23


babySecret

Optional babySecret: string

Defined in

src/models/NvmAccount.ts:14


babyX

Optional babyX: string

Defined in

src/models/NvmAccount.ts:12


babyY

Optional babyY: string

Defined in

src/models/NvmAccount.ts:13


id

Private id: string

Defined in

src/models/NvmAccount.ts:87


kernelClient

Private Optional kernelClient: KernelAccountClient\<"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789", Transport, Chain, any>

Defined in

src/models/NvmAccount.ts:16


password

Private Optional password: string

Defined in

src/models/NvmAccount.ts:11


zeroDevSigner

Private Optional zeroDevSigner: any

Defined in

src/models/NvmAccount.ts:22

Methods

getAccountSigner

getAccountSigner(): any

Returns

any

Defined in

src/models/NvmAccount.ts:94


getAddress

getAddress(): `0x${string}`

Returns

`0x${string}`

Defined in

src/models/NvmAccount.ts:113


getId

getId(): `0x${string}`

Returns

`0x${string}`

Defined in

src/models/NvmAccount.ts:117


getKernelClient

getKernelClient(): undefined | KernelAccountClient\<"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789", Transport, Chain, any>

Returns

undefined | KernelAccountClient\<"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789", Transport, Chain, any>

Defined in

src/models/NvmAccount.ts:98


getPassword

getPassword(): undefined | string

Returns account password.

Returns

undefined | string

The account password.

Defined in

src/models/NvmAccount.ts:153


getPublic

getPublic(): string

Returns

string

Defined in

src/models/NvmAccount.ts:125


getType

getType(): "local" | "json-rpc" | "zerodev" | "sessionKey"

Returns

"local" | "json-rpc" | "zerodev" | "sessionKey"

Defined in

src/models/NvmAccount.ts:102


getZeroDevSigner

getZeroDevSigner(): any

Returns

any

Defined in

src/models/NvmAccount.ts:105


isZeroDev

isZeroDev(): boolean

Returns

boolean

Defined in

src/models/NvmAccount.ts:109


setId

setId(id): void

Parameters

NameType
idstring

Returns

void

Defined in

src/models/NvmAccount.ts:121


setPassword

setPassword(password): void

Set account password.

Parameters

NameTypeDescription
passwordstringPassword for account.

Returns

void

Defined in

src/models/NvmAccount.ts:145


signTextLocally

signTextLocally(text): Promise\<`0x${string}`>

Parameters

NameType
textstring | Uint8Array

Returns

Promise\<`0x${string}`>

Defined in

src/models/NvmAccount.ts:129


fromAccount

fromAccount(account): NvmAccount

Returns a nevermined Account from a viem account

Parameters

NameTypeDescription
accountAccount | PrivateKeyAccountA viem local account

Returns

NvmAccount

The nevermined account

Defined in

src/models/NvmAccount.ts:31


fromAddress

fromAddress(address): NvmAccount

Returns a nevermined Account from an address. This method is used for browser integration (i.e Metamask)

Parameters

NameTypeDescription
address`0x${string}`A wallet address

Returns

NvmAccount

The nevermined account

Defined in

src/models/NvmAccount.ts:44


fromZeroDevSessionKey

fromZeroDevSessionKey(kernelClient): NvmAccount

Parameters

NameType
kernelClientKernelAccountClient\<"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789", Transport, Chain, any>

Returns

NvmAccount

Defined in

src/models/NvmAccount.ts:71


fromZeroDevSigner

fromZeroDevSigner(kernelClient): Promise\<NvmAccount>

Returns a nevermined Account from a zerodev signer

Parameters

NameType
kernelClientKernelAccountClient\<"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789", Transport, Chain, any>

Returns

Promise\<NvmAccount>

The nevermined account

Defined in

src/models/NvmAccount.ts:56