Arcium LogoArcium TS SDK Docs

FieldInfo

Field definition for circuit input/output packing. Pass an array of these to createPacker to create a type-safe packer.

Example

import { FieldInfo } from '@arcium-hq/client';

const fields: FieldInfo[] = [
  { name: 'amount', type: { Integer: { signed: false, width: 64 } } },
  { name: 'active', type: 'Bool' },
];

Properties

PropertyTypeDescription
namestringField name matching the circuit parameter. For array types, use indexed notation (bytes[0], bytes[1]) - the packer groups these back into arrays on unpack.
type{ Integer: { signed: boolean; width: number; }; } | "Bool" | "FullInteger" | "Float" | "Pubkey"Field type: Integer with sign/width, Bool, FullInteger (256-bit), Float, or Pubkey.

On this page