2021-06-07 13:43:31 +03:00
|
|
|
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
|
|
|
2021-06-10 11:49:47 +03:00
|
|
|
import {
|
|
|
|
TypedMap,
|
|
|
|
Entity,
|
|
|
|
Value,
|
|
|
|
ValueKind,
|
|
|
|
store,
|
|
|
|
Address,
|
|
|
|
Bytes,
|
|
|
|
BigInt,
|
|
|
|
BigDecimal
|
|
|
|
} from "@graphprotocol/graph-ts";
|
2021-06-07 13:43:31 +03:00
|
|
|
|
|
|
|
export class Deposit extends Entity {
|
|
|
|
constructor(id: string) {
|
|
|
|
super();
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("id", Value.fromString(id));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
save(): void {
|
2021-06-10 11:49:47 +03:00
|
|
|
let id = this.get("id");
|
|
|
|
assert(id !== null, "Cannot save Deposit entity without an ID");
|
2021-06-07 13:43:31 +03:00
|
|
|
assert(
|
|
|
|
id.kind == ValueKind.STRING,
|
2021-06-10 11:49:47 +03:00
|
|
|
"Cannot save Deposit entity with non-string ID. " +
|
|
|
|
'Considering using .toHex() to convert the "id" to a string.'
|
2021-06-07 13:43:31 +03:00
|
|
|
);
|
2021-06-10 11:49:47 +03:00
|
|
|
store.set("Deposit", id.toString(), this);
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static load(id: string): Deposit | null {
|
2021-06-10 11:49:47 +03:00
|
|
|
return store.get("Deposit", id) as Deposit | null;
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get id(): string {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("id");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toString();
|
|
|
|
}
|
|
|
|
|
|
|
|
set id(value: string) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("id", Value.fromString(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get index(): BigInt {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("index");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBigInt();
|
|
|
|
}
|
|
|
|
|
|
|
|
set index(value: BigInt) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("index", Value.fromBigInt(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get amount(): string {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("amount");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toString();
|
|
|
|
}
|
|
|
|
|
|
|
|
set amount(value: string) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("amount", Value.fromString(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get currency(): string {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("currency");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toString();
|
|
|
|
}
|
|
|
|
|
|
|
|
set currency(value: string) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("currency", Value.fromString(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get commitment(): Bytes {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("commitment");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBytes();
|
|
|
|
}
|
|
|
|
|
|
|
|
set commitment(value: Bytes) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("commitment", Value.fromBytes(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get timestamp(): BigInt {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("timestamp");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBigInt();
|
|
|
|
}
|
|
|
|
|
|
|
|
set timestamp(value: BigInt) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("timestamp", Value.fromBigInt(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get blockNumber(): BigInt {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("blockNumber");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBigInt();
|
|
|
|
}
|
|
|
|
|
|
|
|
set blockNumber(value: BigInt) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("blockNumber", Value.fromBigInt(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get transactionHash(): Bytes {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("transactionHash");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBytes();
|
|
|
|
}
|
|
|
|
|
|
|
|
set transactionHash(value: Bytes) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("transactionHash", Value.fromBytes(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class Withdrawal extends Entity {
|
|
|
|
constructor(id: string) {
|
|
|
|
super();
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("id", Value.fromString(id));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
save(): void {
|
2021-06-10 11:49:47 +03:00
|
|
|
let id = this.get("id");
|
|
|
|
assert(id !== null, "Cannot save Withdrawal entity without an ID");
|
2021-06-07 13:43:31 +03:00
|
|
|
assert(
|
|
|
|
id.kind == ValueKind.STRING,
|
2021-06-10 11:49:47 +03:00
|
|
|
"Cannot save Withdrawal entity with non-string ID. " +
|
|
|
|
'Considering using .toHex() to convert the "id" to a string.'
|
2021-06-07 13:43:31 +03:00
|
|
|
);
|
2021-06-10 11:49:47 +03:00
|
|
|
store.set("Withdrawal", id.toString(), this);
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static load(id: string): Withdrawal | null {
|
2021-06-10 11:49:47 +03:00
|
|
|
return store.get("Withdrawal", id) as Withdrawal | null;
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get id(): string {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("id");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toString();
|
|
|
|
}
|
|
|
|
|
|
|
|
set id(value: string) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("id", Value.fromString(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get to(): Bytes {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("to");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBytes();
|
|
|
|
}
|
|
|
|
|
|
|
|
set to(value: Bytes) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("to", Value.fromBytes(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get fee(): BigInt {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("fee");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBigInt();
|
|
|
|
}
|
|
|
|
|
|
|
|
set fee(value: BigInt) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("fee", Value.fromBigInt(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get index(): BigInt {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("index");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBigInt();
|
|
|
|
}
|
|
|
|
|
|
|
|
set index(value: BigInt) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("index", Value.fromBigInt(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get amount(): string {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("amount");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toString();
|
|
|
|
}
|
|
|
|
|
|
|
|
set amount(value: string) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("amount", Value.fromString(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get currency(): string {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("currency");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toString();
|
|
|
|
}
|
|
|
|
|
|
|
|
set currency(value: string) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("currency", Value.fromString(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get nullifier(): Bytes {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("nullifier");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBytes();
|
|
|
|
}
|
|
|
|
|
|
|
|
set nullifier(value: Bytes) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("nullifier", Value.fromBytes(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get timestamp(): BigInt {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("timestamp");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBigInt();
|
|
|
|
}
|
|
|
|
|
|
|
|
set timestamp(value: BigInt) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("timestamp", Value.fromBigInt(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get blockNumber(): BigInt {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("blockNumber");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBigInt();
|
|
|
|
}
|
|
|
|
|
|
|
|
set blockNumber(value: BigInt) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("blockNumber", Value.fromBigInt(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get transactionHash(): Bytes {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("transactionHash");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBytes();
|
|
|
|
}
|
|
|
|
|
|
|
|
set transactionHash(value: Bytes) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("transactionHash", Value.fromBytes(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class EncryptedNote extends Entity {
|
|
|
|
constructor(id: string) {
|
|
|
|
super();
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("id", Value.fromString(id));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
save(): void {
|
2021-06-10 11:49:47 +03:00
|
|
|
let id = this.get("id");
|
|
|
|
assert(id !== null, "Cannot save EncryptedNote entity without an ID");
|
2021-06-07 13:43:31 +03:00
|
|
|
assert(
|
|
|
|
id.kind == ValueKind.STRING,
|
2021-06-10 11:49:47 +03:00
|
|
|
"Cannot save EncryptedNote entity with non-string ID. " +
|
|
|
|
'Considering using .toHex() to convert the "id" to a string.'
|
2021-06-07 13:43:31 +03:00
|
|
|
);
|
2021-06-10 11:49:47 +03:00
|
|
|
store.set("EncryptedNote", id.toString(), this);
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static load(id: string): EncryptedNote | null {
|
2021-06-10 11:49:47 +03:00
|
|
|
return store.get("EncryptedNote", id) as EncryptedNote | null;
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get id(): string {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("id");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toString();
|
|
|
|
}
|
|
|
|
|
|
|
|
set id(value: string) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("id", Value.fromString(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get index(): BigInt {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("index");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBigInt();
|
|
|
|
}
|
|
|
|
|
|
|
|
set index(value: BigInt) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("index", Value.fromBigInt(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get blockNumber(): BigInt {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("blockNumber");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBigInt();
|
|
|
|
}
|
|
|
|
|
|
|
|
set blockNumber(value: BigInt) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("blockNumber", Value.fromBigInt(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get encryptedNote(): Bytes {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("encryptedNote");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBytes();
|
|
|
|
}
|
|
|
|
|
|
|
|
set encryptedNote(value: Bytes) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("encryptedNote", Value.fromBytes(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get transactionHash(): Bytes {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("transactionHash");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBytes();
|
|
|
|
}
|
|
|
|
|
|
|
|
set transactionHash(value: Bytes) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("transactionHash", Value.fromBytes(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class NoteAccount extends Entity {
|
|
|
|
constructor(id: string) {
|
|
|
|
super();
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("id", Value.fromString(id));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
save(): void {
|
2021-06-10 11:49:47 +03:00
|
|
|
let id = this.get("id");
|
|
|
|
assert(id !== null, "Cannot save NoteAccount entity without an ID");
|
2021-06-07 13:43:31 +03:00
|
|
|
assert(
|
|
|
|
id.kind == ValueKind.STRING,
|
2021-06-10 11:49:47 +03:00
|
|
|
"Cannot save NoteAccount entity with non-string ID. " +
|
|
|
|
'Considering using .toHex() to convert the "id" to a string.'
|
2021-06-07 13:43:31 +03:00
|
|
|
);
|
2021-06-10 11:49:47 +03:00
|
|
|
store.set("NoteAccount", id.toString(), this);
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static load(id: string): NoteAccount | null {
|
2021-06-10 11:49:47 +03:00
|
|
|
return store.get("NoteAccount", id) as NoteAccount | null;
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get id(): string {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("id");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toString();
|
|
|
|
}
|
|
|
|
|
|
|
|
set id(value: string) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("id", Value.fromString(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get index(): BigInt {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("index");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBigInt();
|
|
|
|
}
|
|
|
|
|
|
|
|
set index(value: BigInt) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("index", Value.fromBigInt(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get address(): Bytes {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("address");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBytes();
|
|
|
|
}
|
|
|
|
|
|
|
|
set address(value: Bytes) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("address", Value.fromBytes(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get encryptedAccount(): Bytes {
|
2021-06-10 11:49:47 +03:00
|
|
|
let value = this.get("encryptedAccount");
|
2021-06-07 13:43:31 +03:00
|
|
|
return value.toBytes();
|
|
|
|
}
|
|
|
|
|
|
|
|
set encryptedAccount(value: Bytes) {
|
2021-06-10 11:49:47 +03:00
|
|
|
this.set("encryptedAccount", Value.fromBytes(value));
|
2021-06-07 13:43:31 +03:00
|
|
|
}
|
|
|
|
}
|