1 | import * as pb from './proto/loom_pb';
|
2 | export declare class LocalAddress {
|
3 | bytes: Uint8Array;
|
4 | constructor(bytes: Uint8Array);
|
5 | isEmpty(): boolean;
|
6 | toString(): string;
|
7 | equals(other: LocalAddress): boolean;
|
8 | static fromHexString(hexAddr: string): LocalAddress;
|
9 | /**
|
10 | * Converts a public key to a local address (which is used as unique identifier within a DAppChain).
|
11 | * @param publicKey 32-byte public key.
|
12 | * @returns Array of bytes representing a local address.
|
13 | */
|
14 | static fromPublicKey(publicKey: Uint8Array): LocalAddress;
|
15 | }
|
16 | export declare class Address {
|
17 | chainId: string;
|
18 | local: LocalAddress;
|
19 | constructor(chainId: string, local: LocalAddress);
|
20 | isEmpty(): boolean;
|
21 | toString(): string;
|
22 | MarshalPB(): pb.Address;
|
23 | equals(other: Address): boolean;
|
24 | static UmarshalPB(pb: pb.Address): Address;
|
25 | /**
|
26 | * Converts a string to an address.
|
27 | * @param address String representation of an address, in the format "chain:0x...".
|
28 | */
|
29 | static fromString(address: string): Address;
|
30 | }
|