@strandgeek/powerup
Version:
PowerUP is a javascript library that makes managing a LUKSO Universal Profile easy
43 lines (42 loc) • 1.27 kB
TypeScript
import Web3 from "web3";
import { Contract } from 'web3-eth-contract';
import { LinkMetdata, ProfileDataBeforeUpload } from "@lukso/lsp-factory.js";
import { AssetMetadata, ImageMetadata } from "@lukso/lsp-factory.js/build/main/src/lib/interfaces/metadata";
export interface ProfileOptions {
ipfsGateway: string;
}
declare type ProfileHandle = {
name: string;
tag: string;
toString: () => string;
};
export interface ProfileOptions {
address: string;
web3: Web3;
}
export declare type UpdateProfileData = ProfileDataBeforeUpload;
export declare class Profile {
private web3;
private lspFactory;
private lsp3Profile;
private currentAccount;
address: string;
upContract: Contract;
ipfsGateway: string;
constructor(opts: ProfileOptions);
private getCurrentAccount;
get name(): string;
get description(): string;
get links(): LinkMetdata[];
get tags(): string[];
get avatar(): AssetMetadata[];
get profileImage(): ImageMetadata[];
get backgroundImage(): ImageMetadata[];
load(): Promise<void>;
get handle(): ProfileHandle;
generateUploadData(): Promise<{
LSP3Profile: ProfileDataBeforeUpload;
}>;
update(data: UpdateProfileData): Promise<void>;
}
export {};