// automatically generated by the FlatBuffers compiler, do not modify /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */ import * as flatbuffers from 'flatbuffers'; export class PrivateKeyInfo { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):PrivateKeyInfo { this.bb_pos = i; this.bb = bb; return this; } static getRootAsPrivateKeyInfo(bb:flatbuffers.ByteBuffer, obj?:PrivateKeyInfo):PrivateKeyInfo { return (obj || new PrivateKeyInfo()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } static getSizePrefixedRootAsPrivateKeyInfo(bb:flatbuffers.ByteBuffer, obj?:PrivateKeyInfo):PrivateKeyInfo { bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); return (obj || new PrivateKeyInfo()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } bitLen():bigint { const offset = this.bb!.__offset(this.bb_pos, 4); return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0'); } mutate_bit_len(value:bigint):boolean { const offset = this.bb!.__offset(this.bb_pos, 4); if (offset === 0) { return false; } this.bb!.writeInt64(this.bb_pos + offset, value); return true; } size():bigint { const offset = this.bb!.__offset(this.bb_pos, 6); return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0'); } mutate_size(value:bigint):boolean { const offset = this.bb!.__offset(this.bb_pos, 6); if (offset === 0) { return false; } this.bb!.writeInt64(this.bb_pos + offset, value); return true; } error():string|null error(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null error(optionalEncoding?:any):string|Uint8Array|null { const offset = this.bb!.__offset(this.bb_pos, 8); return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; } static startPrivateKeyInfo(builder:flatbuffers.Builder) { builder.startObject(3); } static addBitLen(builder:flatbuffers.Builder, bitLen:bigint) { builder.addFieldInt64(0, bitLen, BigInt('0')); } static addSize(builder:flatbuffers.Builder, size:bigint) { builder.addFieldInt64(1, size, BigInt('0')); } static addError(builder:flatbuffers.Builder, errorOffset:flatbuffers.Offset) { builder.addFieldOffset(2, errorOffset, 0); } static endPrivateKeyInfo(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); return offset; } static createPrivateKeyInfo(builder:flatbuffers.Builder, bitLen:bigint, size:bigint, errorOffset:flatbuffers.Offset):flatbuffers.Offset { PrivateKeyInfo.startPrivateKeyInfo(builder); PrivateKeyInfo.addBitLen(builder, bitLen); PrivateKeyInfo.addSize(builder, size); PrivateKeyInfo.addError(builder, errorOffset); return PrivateKeyInfo.endPrivateKeyInfo(builder); } }