InstructionArgumentNode.ts 426 B

123456789101112
  1. import { InstructionArgumentNode, instructionArgumentNode } from '@codama/nodes';
  2. import { IdlV00Field } from './idl';
  3. import { typeNodeFromAnchorV00 } from './typeNodes';
  4. export function instructionArgumentNodeFromAnchorV00(idl: IdlV00Field): InstructionArgumentNode {
  5. return instructionArgumentNode({
  6. docs: idl.docs ?? [],
  7. name: idl.name ?? '',
  8. type: typeNodeFromAnchorV00(idl.type),
  9. });
  10. }