minca
ApiCoreInterfaces

Interface: ContractContext\<B\>

Defined in: packages/core/src/records/contract-builder.ts:243

What a contract reads (spec 09 §5.2), and the functions it calls

Type Parameters

Type Parameter
B

Properties

PropertyModifierTypeDescriptionDefined in
authorreadonlyStrExprThe writer's accountpackages/core/src/records/contract-builder.ts:255
bodyreadonlyExpr<B>-packages/core/src/records/contract-builder.ts:244
citedreadonly<L>(ids, collection) => ListExpr<Cited<BodyIn<L>>>The versions cited by these ids that are in collection, typed from its schema: cited(body.votes, vote). Versions of any other collection are left out, so a claim can't pass on something else cited in their place.packages/core/src/records/contract-builder.ts:265
collectionreadonlyStrExpr-packages/core/src/records/contract-builder.ts:253
createdAtreadonlyStrExprWhat the writer's clock said, which nothing checkspackages/core/src/records/contract-builder.ts:259
creatorreadonlyStrExprThe account that wrote the record's first versionpackages/core/src/records/contract-builder.ts:257
hasreadonly(field) => BoolExprhas(body.note): whether a field is therepackages/core/src/records/contract-builder.ts:280
hashreadonly(value) => StrExprThe content id of a value's canonical JSON; of a body, its bodyHash. For commit-then-revealpackages/core/src/records/contract-builder.ts:278
keyreadonlyStrExprThe record's keypackages/core/src/records/contract-builder.ts:250
linkreadonly(rel) => StrExprWhat this version's first link with that role points at, or nullpackages/core/src/records/contract-builder.ts:274
linksreadonlyListExpr<LinkValue>This version's links, each { rel, to }packages/core/src/records/contract-builder.ts:248
memberreadonly(did) => BoolExprWhether an account is a member, as of this versionpackages/core/src/records/contract-builder.ts:276
prevreadonlyVersionExpr<B>The version before, or null on a first version: prev.eq(null)packages/core/src/records/contract-builder.ts:246
rawreadonly<T>(cel) => Expr<T>CEL written by hand, for what the builder doesn't cover: map literals, math.greatest, string(), uint values. Its type is yours to say, as in raw<boolean>('…')packages/core/src/records/contract-builder.ts:288
seqreadonlyIntExprThis version's place in the record, an intpackages/core/src/records/contract-builder.ts:252
versionsreadonly(ids) => ListExpr<Cited<unknown>>The versions cited by these ids, in order: generic until narrowed with .of(collection). cited is usually what you wantpackages/core/src/records/contract-builder.ts:270
whenreadonly<R>(test, then, otherwise) => Rtest ? then : otherwisepackages/core/src/records/contract-builder.ts:282

On this page