node_modules/@velas/solana-web3/lib/index.browser.esm.js
/**
 * Populate a buffer of instruction data using an InstructionType
 * @internal
 */
Populate a buffer of instruction data using an InstructionType
@internal
Populate a buffer of instruction data using an InstructionType @internal
function encodeData(type, fields) {
  const allocLength = type.layout.span >= 0 ? type.layout.span : getAlloc(type, fields);
  const data = buffer.Buffer.alloc(allocLength);
  const layoutFields = Object.assign({
    instruction: type.index
  }, fields);
  type.layout.encode(layoutFields, data);
  return data;
}
function encodeData ( type , fields ) { const allocLength = type . layout . span >= 0 ? type . layout . span : getAlloc ( type , fields ) ; const data = buffer . Buffer . alloc ( allocLength ) ; const layoutFields = Object . assign ( { instruction : type . index } , fields ) ; type . layout . encode ( layoutFields , data ) ; return data ; }
Populate a buffer of instruction data using an InstructionType
 @internal
Populate a buffer of instruction data using an InstructionType @internal