@nevermined-io/sdk - v3.0.48 / NvmAccount
Account information.
• new NvmAccount(id
, accountType?
): NvmAccount
Name | Type |
---|---|
id |
string |
accountType |
NvmAccountType |
• Private
Optional
accountSigner: Account
| { address
: `0x${string}` ; experimental_signAuthorization
: (parameters
: Authorization
) => Promise
<SignAuthorizationReturnType
> ; nonceManager?
: NonceManager
; publicKey
: `0x${string}` ; sign
: (parameters
: { hash
: `0x${string}` }) => Promise
<`0x${string}`> ; signMessage
: (__namedParameters
: { message
: SignableMessage
}) => Promise
<`0x${string}`> ; signTransaction
: <serializer, transaction>(transaction
: transaction
, options?
: { serializer?
: serializer
}) => Promise
<IsNarrowable
<TransactionSerialized
<GetTransactionType
<transaction
>>, `0x${string}`> extends true
? TransactionSerialized
<GetTransactionType
<transaction
>> : `0x${string}`> ; signTypedData
: <typedData, primaryType>(parameters
: TypedDataDefinition
<typedData
, primaryType
>) => Promise
<`0x${string}`> ; source
: "privateKey"
; type
: "local"
}
• accountType: NvmAccountType
• Optional
babySecret: string
• Optional
babyX: string
• Optional
babyY: string
• Private
id: string
• Private
Optional
kernelClient: KernelAccountClient
<Transport
, Chain
, any
, any
, any
>
• Private
Optional
password: string
• Private
Optional
zeroDevSigner: SmartAccount
<any
>
▸ getAccountSigner(): undefined
| Account
| SmartAccount
<any
> | { address
: `0x${string}` ; experimental_signAuthorization
: (parameters
: Authorization
) => Promise
<SignAuthorizationReturnType
> ; nonceManager?
: NonceManager
; publicKey
: `0x${string}` ; sign
: (parameters
: { hash
: `0x${string}` }) => Promise
<`0x${string}`> ; signMessage
: (__namedParameters
: { message
: SignableMessage
}) => Promise
<`0x${string}`> ; signTransaction
: <serializer, transaction>(transaction
: transaction
, options?
: { serializer?
: serializer
}) => Promise
<IsNarrowable
<TransactionSerialized
<GetTransactionType
<transaction
>>, `0x${string}`> extends true
? TransactionSerialized
<GetTransactionType
<transaction
>> : `0x${string}`> ; signTypedData
: <typedData, primaryType>(parameters
: TypedDataDefinition
<typedData
, primaryType
>) => Promise
<`0x${string}`> ; source
: "privateKey"
; type
: "local"
}
undefined
| Account
| SmartAccount
<any
> | { address
: `0x${string}` ; experimental_signAuthorization
: (parameters
: Authorization
) => Promise
<SignAuthorizationReturnType
> ; nonceManager?
: NonceManager
; publicKey
: `0x${string}` ; sign
: (parameters
: { hash
: `0x${string}` }) => Promise
<`0x${string}`> ; signMessage
: (__namedParameters
: { message
: SignableMessage
}) => Promise
<`0x${string}`> ; signTransaction
: <serializer, transaction>(transaction
: transaction
, options?
: { serializer?
: serializer
}) => Promise
<IsNarrowable
<TransactionSerialized
<GetTransactionType
<transaction
>>, `0x${string}`> extends true
? TransactionSerialized
<GetTransactionType
<transaction
>> : `0x${string}`> ; signTypedData
: <typedData, primaryType>(parameters
: TypedDataDefinition
<typedData
, primaryType
>) => Promise
<`0x${string}`> ; source
: "privateKey"
; type
: "local"
}
▸ getAddress(): `0x${string}`
`0x${string}`
▸ getId(): `0x${string}`
`0x${string}`
▸ getKernelClient(): undefined
| KernelAccountClient
<Transport
, Chain
, any
, any
, any
>
undefined
| KernelAccountClient
<Transport
, Chain
, any
, any
, any
>
▸ getPassword(): undefined
| string
Returns account password.
undefined
| string
The account password.
▸ getPublic(): string
string
▸ getType(): "local"
| "json-rpc"
| "smart"
| "zerodev"
| "sessionKey"
"local"
| "json-rpc"
| "smart"
| "zerodev"
| "sessionKey"
▸ getZeroDevSigner(): SmartAccount
<any
>
SmartAccount
<any
>
▸ isZeroDev(): boolean
boolean
▸ setId(id
): void
Name | Type |
---|---|
id |
string |
void
▸ setPassword(password
): void
Set account password.
Name | Type | Description |
---|---|---|
password |
string |
Password for account. |
void
▸ signTextLocally(text
): Promise
<`0x${string}`>
Name | Type |
---|---|
text |
string | Uint8Array |
Promise
<`0x${string}`>
▸ fromAccount(account
): NvmAccount
Returns a nevermined Account from a viem account
Name | Type | Description |
---|---|---|
account |
Account | { address : `0x${string}` ; experimental_signAuthorization : (parameters : Authorization ) => Promise <SignAuthorizationReturnType > ; nonceManager? : NonceManager ; publicKey : `0x${string}` ; sign : (parameters : { hash : `0x${string}` }) => Promise <`0x${string}`> ; signMessage : (__namedParameters : { message : SignableMessage }) => Promise <`0x${string}`> ; signTransaction : <serializer, transaction>(transaction : transaction , options? : { serializer? : serializer }) => Promise <IsNarrowable <TransactionSerialized <GetTransactionType <transaction >>, `0x${string}`> extends true ? TransactionSerialized <GetTransactionType <transaction >> : `0x${string}`> ; signTypedData : <typedData, primaryType>(parameters : TypedDataDefinition <typedData , primaryType >) => Promise <`0x${string}`> ; source : "privateKey" ; type : "local" } |
A viem local account |
The nevermined account
▸ fromAddress(address
): NvmAccount
Returns a nevermined Account from an address. This method is used for browser integration (i.e Metamask)
Name | Type | Description |
---|---|---|
address |
`0x${string}` | A wallet address |
The nevermined account
▸ fromZeroDevSessionKey(kernelClient
): NvmAccount
Name | Type |
---|---|
kernelClient |
KernelAccountClient <Transport , Chain , any , any , any > |
▸ fromZeroDevSigner(kernelClient
): Promise
<NvmAccount
>
Returns a nevermined Account from a zerodev signer
Name | Type |
---|---|
kernelClient |
KernelAccountClient <Transport , Chain , any , any , any > |
Promise
<NvmAccount
>
The nevermined account