sdk-js

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

Class: NvmAccount

Account information.

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new NvmAccount(id, accountType?): NvmAccount

Parameters

Name Type
id string
accountType NvmAccountType

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

Name Type
id string

Returns

void

Defined in

src/models/NvmAccount.ts:121


setPassword

setPassword(password): void

Set account password.

Parameters

Name Type Description
password string Password for account.

Returns

void

Defined in

src/models/NvmAccount.ts:145


signTextLocally

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

Parameters

Name Type
text string | 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

Name Type Description
account Account | PrivateKeyAccount A 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

Name Type Description
address `0x${string}` A wallet address

Returns

NvmAccount

The nevermined account

Defined in

src/models/NvmAccount.ts:44


fromZeroDevSessionKey

fromZeroDevSessionKey(kernelClient): NvmAccount

Parameters

Name Type
kernelClient KernelAccountClient<"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

Name Type
kernelClient KernelAccountClient<"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789", Transport, Chain, any>

Returns

Promise<NvmAccount>

The nevermined account

Defined in

src/models/NvmAccount.ts:56