Global

Members

# ERC20Events

Enum representing the events emitted by an ERC20 contract.

Enum representing the events emitted by an ERC20 contract.

View Source shared/erc20/erc20-constants.ts, line 9

# constant SEGREGATED_COLLECTION_EXTRACTION_PRIORITY

This priority ensures collections are registered in context before any sequence operations occur, allowing sequences to be replicated to private/shared collections.

Priority for early collection extraction (before pk generation at priority 60)

View Source shared/decorators.ts, line 279

Methods

# Owner() → {MethodDecorator}

Decorator for marking methods that require ownership authorization.

Decorator for marking methods that require ownership authorization. Checks the owner of the token before allowing the method to be executed.

View Source shared/decorators.ts, line 37

A method decorator that checks ownership authorization.

MethodDecorator
Example
```typescript
class TokenContract extends Contract {
  

# decrypt(encryptedText, keyObject)

Util function to decrypt data

Parameters:
Name Type Description
encryptedText BufferSource
keyObject keyObject

View Source client/crypto.ts, line 322

# encrypt(text, keyObject)

Util function to decrypt data

Parameters:
Name Type Description
text string
keyObject keyObject

View Source client/crypto.ts, line 308

# extractMspId(identity)

Extracts the MSP ID from either a string or ClientIdentity object

.

Extracts the MSP ID from either a string or ClientIdentity object

Parameters:
Name Type Description
identity

The identity value which can be a string MSP ID or ClientIdentity object

View Source shared/decorators.ts, line 14

The MSP ID as a string, or undefined if not available

# extractSegregatedCollections(context, data, keys, model) → {Promise.<void>}

Runs with priority < 40 to extract collection names before pk generation (priority 60). This allows FabricContractSequence to know which collections to replicate to.

Early handler to extract and register collections in context

Parameters:
Name Type Description
context ContextOf.<Repository.<M, any>>

The execution context

data SegregatedDataMetadata | Array.<SegregatedDataMetadata>

The segregated data metadata

keys string | Array.<string>

The property key(s) being segregated

model M

The model instance

View Source shared/decorators.ts, line 346

Promise.<void>

# getAkiAndSerialFromCert()

Extracts the certificate Serial Number and the AKI (Authority Key Identifier) in the format Fabric CA expects (plain hex, no colons).

Extracts the certificate Serial Number and the AKI (Authority Key Identifier) in the format Fabric CA expects (plain hex, no colons).

View Source client/utils.ts, line 202

# getDerivationKey(salt, key)

Util function to derive a key from another key

Parameters:
Name Type Description
salt string
key CryptoKey

Original key

View Source client/crypto.ts, line 268

# getKey(derivation)

Util function to get the key and IV from the CrytoKey array

Parameters:
Name Type Description
derivation ArrayBuffer

View Source client/crypto.ts, line 289

# getMaster(data)

Util function to get a random master key

If data is not passed, a random ArrayBuffer will be generated

Parameters:
Name Type Description
data ArrayBuffer

encrytion data

View Source client/crypto.ts, line 247

# getVersionOf()

Correctly extracts the version number from a model by inspecting the property decorated with @version().

Correctly extracts the version number from a model by inspecting the property decorated with @version().

Model.versionProp() has a bug where it returns Object.keys(meta)[0] (the first metadata key overall) instead of the actual version property name. This helper uses Metadata.get() correctly to find the DBKeys.VERSION entry and then reads the first property name from it.

View Source contract/models/history-dec.ts, line 19

the version number (>= 1), or undefined if none found.

# normalizeRelationsForAudit()

Returns a shallow-cloned copy of the model where each relation array item is normalised to its string ID.

Returns a shallow-cloned copy of the model where each relation array item is normalised to its string ID. This ensures that { id: "x" } and "x" compare as equal so that unchanged relations produce no diff.

View Source contract/models/decorators-private.ts, line 57

# populateRelations()

Returns a shallow-cloned copy of the model with relation properties resolved to their full instances.

Returns a shallow-cloned copy of the model with relation properties resolved to their full instances. The original model is NOT mutated.

View Source contract/models/decorators.ts, line 40

# sortKeysOnlyRecursive(obj) → {any}

Recursively sorts object keys without reordering arrays

.

Recursively sorts object keys without reordering arrays

Parameters:
Name Type Description
obj any

The value to process

View Source shared/DeterministicSerializer.ts, line 10

A copy with sorted object keys but preserved array order

any