-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy pathindex.ts
35 lines (28 loc) · 984 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* eslint-disable max-classes-per-file */
export type Bech32Address = `fuel${string}`;
export type B256Address = string;
export abstract class AbstractScript<T> {
abstract bytes: Uint8Array;
abstract encodeScriptData: (data: T) => Uint8Array;
}
export abstract class AbstractAddress {
abstract toAddress(): Bech32Address;
abstract toB256(): B256Address;
abstract toHexString(): string;
abstract toBytes(): Uint8Array;
abstract equals(other: AbstractAddress): boolean;
}
export abstract class AbstractContract {
abstract id: AbstractAddress;
}
export abstract class AbstractWallet {
abstract address: AbstractAddress;
}
export type AddressLike = AbstractAddress | AbstractWallet;
export type ContractIdLike = AbstractAddress | AbstractContract;
export abstract class AbstractPredicate {
abstract bytes: Uint8Array;
abstract address: AbstractAddress;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
abstract types?: ReadonlyArray<any>;
}