Skip to content

nooschain v0.1.0


nooschain / chain/actors / resolveTransactionActor

Function: resolveTransactionActor()

resolveTransactionActor(trx, transaction): Promise<ResolvedTransactionActor>

Defined in: chain/actors.ts:55

Resolves the actor associated with a transaction by looking up the signer's public key in the users table. If the public key is "GENESIS", it is treated as a system actor. If the public key is not found in the users table, it is still treated as a user actor but without an associated user ID or organization ID.

Parameters

trx

ChainDatabase

The database transaction to use for the lookup.

transaction

The transaction object containing the signer's public key, which can be in either camelCase or snake_case format.

signer_public_key?

string

signerPublicKey?

string

Returns

Promise<ResolvedTransactionActor>

A promise that resolves to the resolved transaction actor, which can be a system actor or a user actor depending on the public key.

Audience-first NOOSChain documentation.