import { Writer, Reader } from "as-proto"; export namespace common { export class str { static encode(message: str, writer: Writer): void { const unique_name_value = message.value; if (unique_name_value !== null) { writer.uint32(10); writer.string(unique_name_value); } } static decode(reader: Reader, length: i32): str { const end: usize = length < 0 ? reader.end : reader.ptr + length; const message = new str(); while (reader.ptr < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.value = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; } value: string | null; constructor(value: string | null = null) { this.value = value; } } @unmanaged export class uint32 { static encode(message: uint32, writer: Writer): void { if (message.value != 0) { writer.uint32(8); writer.uint32(message.value); } } static decode(reader: Reader, length: i32): uint32 { const end: usize = length < 0 ? reader.end : reader.ptr + length; const message = new uint32(); while (reader.ptr < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.value = reader.uint32(); break; default: reader.skipType(tag & 7); break; } } return message; } value: u32; constructor(value: u32 = 0) { this.value = value; } } @unmanaged export class uint64 { static encode(message: uint64, writer: Writer): void { if (message.value != 0) { writer.uint32(8); writer.uint64(message.value); } } static decode(reader: Reader, length: i32): uint64 { const end: usize = length < 0 ? reader.end : reader.ptr + length; const message = new uint64(); while (reader.ptr < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.value = reader.uint64(); break; default: reader.skipType(tag & 7); break; } } return message; } value: u64; constructor(value: u64 = 0) { this.value = value; } } @unmanaged export class boole { static encode(message: boole, writer: Writer): void { if (message.value != false) { writer.uint32(8); writer.bool(message.value); } } static decode(reader: Reader, length: i32): boole { const end: usize = length < 0 ? reader.end : reader.ptr + length; const message = new boole(); while (reader.ptr < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.value = reader.bool(); break; default: reader.skipType(tag & 7); break; } } return message; } value: bool; constructor(value: bool = false) { this.value = value; } } export class address { static encode(message: address, writer: Writer): void { const unique_name_value = message.value; if (unique_name_value !== null) { writer.uint32(10); writer.bytes(unique_name_value); } } static decode(reader: Reader, length: i32): address { const end: usize = length < 0 ? reader.end : reader.ptr + length; const message = new address(); while (reader.ptr < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.value = reader.bytes(); break; default: reader.skipType(tag & 7); break; } } return message; } value: Uint8Array | null; constructor(value: Uint8Array | null = null) { this.value = value; } } export class list_args { static encode(message: list_args, writer: Writer): void { const unique_name_start = message.start; if (unique_name_start !== null) { writer.uint32(10); writer.bytes(unique_name_start); } if (message.limit != 0) { writer.uint32(16); writer.int32(message.limit); } if (message.descending != false) { writer.uint32(24); writer.bool(message.descending); } } static decode(reader: Reader, length: i32): list_args { const end: usize = length < 0 ? reader.end : reader.ptr + length; const message = new list_args(); while (reader.ptr < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.start = reader.bytes(); break; case 2: message.limit = reader.int32(); break; case 3: message.descending = reader.bool(); break; default: reader.skipType(tag & 7); break; } } return message; } start: Uint8Array | null; limit: i32; descending: bool; constructor( start: Uint8Array | null = null, limit: i32 = 0, descending: bool = false ) { this.start = start; this.limit = limit; this.descending = descending; } } export class addresses { static encode(message: addresses, writer: Writer): void { const unique_name_accounts = message.accounts; if (unique_name_accounts.length !== 0) { for (let i = 0; i < unique_name_accounts.length; ++i) { writer.uint32(10); writer.bytes(unique_name_accounts[i]); } } } static decode(reader: Reader, length: i32): addresses { const end: usize = length < 0 ? reader.end : reader.ptr + length; const message = new addresses(); while (reader.ptr < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.accounts.push(reader.bytes()); break; default: reader.skipType(tag & 7); break; } } return message; } accounts: Array; constructor(accounts: Array = []) { this.accounts = accounts; } } }