@avalabs/avalanchejs
Version:
Avalanche Platform JS Library
38 lines • 1.85 kB
TypeScript
import type { OutputOwners, TransferableInput } from '../serializable';
import type { Utxo } from '../serializable/avax/utxo';
import { Address } from '../serializable/fxs/common';
export type MatchOwnerResult = {
sigIndicies: number[];
addressMap: AddressMap;
};
export declare const matchOwners: (owners: OutputOwners, inputAddrs: Address[], minIssuanceTime: bigint, sigindices?: number[]) => MatchOwnerResult | undefined;
export declare class AddressMap {
constructor(initialData?: [Address, number][]);
storage: Map<string, number>;
set(add: Address, item: number): this;
toJSON(): [string, number][];
static fromJSON(maps: [string, number][]): AddressMap;
get(add: Address): number | undefined;
has(add: Address): boolean;
size(): number;
forEach(cb: (value: number, key: Address) => void): void;
forEachHex(cb: (value: number, key: string) => void, shouldReorderWithoutGaps?: boolean): void;
values(): IterableIterator<number>;
}
export declare class AddressMaps {
constructor(addressMaps?: AddressMap[]);
private storage;
private index;
private orderedIndex;
push(...addressMaps: AddressMap[]): void;
static fromTransferableInputs(inputs: readonly TransferableInput[], inputUtxos: readonly Utxo[], minIssuanceTime: bigint, fromAddressesBytes?: readonly Uint8Array[]): AddressMaps;
toJSON(): AddressMap[];
static fromJSON(addressMaps: [string, number][][]): AddressMaps;
getAddresses(): Uint8Array[];
forEach(cb: (coordinates: [number, number][], address: string) => void, useReorderedIndices?: boolean): void;
has(address: Address): boolean;
toArray(): AddressMap[];
merge(newMap: AddressMaps): void;
getSigIndicesForAddress(address: Address, useReorderedIndices?: boolean): [number, number][];
}
//# sourceMappingURL=addressMap.d.ts.map