UNPKG

@protonsale/sdk

Version:
93 lines 12.7 kB
import { MaybeHexString, AptosClient, AptosAccount, TxnBuilderTypes, HexString, Types } from "aptos"; import { ISale } from "./types"; /** * Provides methods for retrieving data from Aptos node. * For more detailed API specification see {@link https://fullnode.devnet.aptoslabs.com/v1/spec} */ export declare const NODE_URL_DEVNET = "https://fullnode.devnet.aptoslabs.com/v1"; export declare const NODE_URL_TESTNET = "https://fullnode.testnet.aptoslabs.com/v1"; export declare const NODE_URL_MAINNET = "https://fullnode.mainnet.aptoslabs.com/v1"; export declare class ProtonSaleClient extends AptosClient { saleAddress: MaybeHexString; airdropAddress: MaybeHexString; network: string; apiEndpoint: string; apiEndpointCreateCoin: string; eventAddress: string; globalStorageAddress: string; constructor(_networkType: string, _network?: string, _saleAddress?: string, _airdropAddress?: string, config?: Partial<Types.OpenAPIConfig>); genInitializeCoinPayload: (account: HexString, moduleName: string, name: string, symbol: string, decimals: number) => Promise<TxnBuilderTypes.RawTransaction>; initializeCoin: (account: AptosAccount, moduleName: string, name: string, symbol: string, decimals: number) => Promise<string>; initAirdrop: (account: AptosAccount, moduleAddress: string | undefined) => Promise<string>; genCreateAirdropHasWhitelistPayload: (account: HexString, coinType: string, id: string, claimAmount: string, addresses: string[], moduleAddress: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; genCreateAirdropHasWhitelistEntryPayload: (account: HexString, coinType: string, id: string, claimAmount: string, addresses: string[], moduleAddress: string | undefined) => Promise<TxnBuilderTypes.TransactionPayloadEntryFunction>; createAirdropHasWhitelist: (account: AptosAccount, coinType: string, id: string, claimAmount: string, addresses: string[], moduleAddress: string | undefined) => Promise<string>; genCreateAirdropNotWhitelistPayload: (account: HexString, moduleName: string, id: string, claimAmount: string, numberReceiver: string, moduleAddress: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; createAirdropNotWhitelist: (account: AptosAccount, moduleName: string, id: string, claimAmount: string, numberReceiver: string, moduleAddress: string | undefined) => Promise<string>; genClaimAirdropNotWhitelistPayload: (account: HexString, coinType: string, sourceAddress: HexString, id: string, moduleAddress: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; claimAirdropNotWhitelist: (account: AptosAccount, coinType: string, sourceAddress: HexString, id: string, moduleAddress: string | undefined) => Promise<string>; genClaimAirdropHasWhitelistPayload: (account: HexString, coinType: string, sourceAddress: HexString, id: string, moduleAddress: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; claimAirdropHasWhitelist: (account: AptosAccount, coinType: string, sourceAddress: string, id: string, moduleAddress: string | undefined) => Promise<string>; genCreateLockPayload: (account: HexString, coinType: string, name: string, duration: string, amount: string, moduleAddress: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; createLock: (account: AptosAccount, coinType: string, name: string, duration: string, amount: string, moduleAddress: string | undefined) => Promise<string>; genClaimLockPayload: (account: HexString, coinType: string, name: string, moduleAddress: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; claimLock: (account: AptosAccount, coinType: string, name: string, moduleAddress: string | undefined) => Promise<string>; genRegisterCoinPayload: (coinReceiver: HexString, coinTypeAddress: HexString, moduleName: string) => Promise<TxnBuilderTypes.RawTransaction>; registerCoin: (coinReceiver: AptosAccount, coinTypeAddress: HexString, moduleName: string) => Promise<string>; genMintCoinPayload: (coinOwner: HexString, coinTypeAddress: HexString, moduleName: string, receiverAddress: HexString, amount: number) => Promise<TxnBuilderTypes.RawTransaction>; mintCoin: (coinOwner: AptosAccount, coinTypeAddress: HexString, moduleName: string, receiverAddress: HexString, amount: number) => Promise<string>; genCreateSalePayload: (account: HexString, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, saleName: string, sale_coin_amount: string, sale_start_time: string, whitelist_duration: string, non_whitelist_duration: string, hardcap: string, tge_duration: string, tge_percent: number, vesting_cycle_duration: string, vesting_cycle_percent: number, liquidity_percent: number, liquidity_lock_duration: string, listing_price_increase_percent: number, max_contribute: string, module_address: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; createSale: (account: AptosAccount, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, saleName: string, sale_coin_amount: string, sale_start_time: string, whitelist_duration: string, non_whitelist_duration: string, hardcap: string, tge_duration: string, tge_percent: number, vesting_cycle_duration: string, vesting_cycle_percent: number, liquidity_percent: number, liquidity_lock_duration: string, listing_price_increase_percent: number, max_contribute: string, module_address: string | undefined) => Promise<string>; genCreatePresalePayload: (account: HexString, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, saleName: string, sale_coin_amount: string, sale_start_time: string, whitelist_duration: string, non_whitelist_duration: string, hardcap: string, tge_percent: number, vesting_cycle_duration: string, vesting_cycle_percent: number, max_contribute: string, module_address: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; createPresale: (account: AptosAccount, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, saleName: string, sale_coin_amount: string, sale_start_time: string, whitelist_duration: string, non_whitelist_duration: string, hardcap: string, tge_percent: number, vesting_cycle_duration: string, vesting_cycle_percent: number, max_contribute: string, module_address: string | undefined) => Promise<string>; genClaimPayload: (account: HexString, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, creator: string, id: string, minter: string, counter: string, module_address: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; claim: (account: AptosAccount, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, creator: string, id: string, minter: string, counter: string, module_address: string | undefined) => Promise<string>; genSetPresaleTgeTime: (account: HexString, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, creator: string, id: string, tge: string, module_address: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; setPresaleTgeTime: (account: AptosAccount, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, creator: string, id: string, tge: string, module_address: string | undefined) => Promise<string>; genSetBaseUri: (account: HexString, uri: string, module_address: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; setBaseUri: (account: AptosAccount, uri: string, module_address: string | undefined) => Promise<string>; genProtonInitializePayload: (account: HexString, default_domain: string, royalty_fee: number, creating_fee: number, commission_percent: number, receiver: string, min_softcap_percent: number, min_liquidity_percent: number, module_address: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; protonInitialize: (account: AptosAccount, default_domain: string, royalty_fee: number, creating_fee: number, commission_percent: number, receiver: string, min_softcap_percent: number, min_liquidity_percent: number, module_address: string | undefined) => Promise<string>; genSetCreatingFee: (account: HexString, new_creating_fee: string, module_address: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; setCreatingFee: (account: AptosAccount, new_creating_fee: string, module_address: string | undefined) => Promise<string>; genContributePayload: (account: HexString, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, creator: string, name: string, amount: string, module_address: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; contribute: (account: AptosAccount, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, creator: string, name: string, amount: string, module_address: string | undefined) => Promise<string>; genAddWhitelistPayload: (account: HexString, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, creator: string, name: string, addresses: string[], module_address: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; genAddWhitelistEntryPayload: (account: HexString, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, creator: string, name: string, addresses: string[], module_address: string | undefined) => Promise<TxnBuilderTypes.TransactionPayloadEntryFunction>; addWhitelist: (account: AptosAccount, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, creator: string, name: string, addresses: string[], module_address: string | undefined) => Promise<string>; genPublishCoinPayload: (coinOwner: HexString, tokenName: string, tokenSym: string, decimals: number, moduleName: string, supply: string) => Promise<any>; genPublishCoinEntryPayload: (coinOwner: HexString, tokenName: string, tokenSym: string, decimals: number, moduleName: string, supply: string) => Promise<any>; genPublishCoinNormalPayload: (coinOwner: HexString, tokenName: string, tokenSym: string, decimals: number, moduleName: string, supply: string, isCustomCointype?: boolean) => Promise<any>; genCreateCoinPayload: (coinOwner: HexString, moduleName: string, amount: number, module_address: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; createCoin: (coinOwner: AptosAccount, moduleName: string, amount: number, module_address: string | undefined) => Promise<string>; publishCoin: (coinOwner: AptosAccount, tokenName: string, tokenSym: string, decimals: number, moduleName: string, supply: string) => Promise<string>; getAllPresale: () => Promise<ISale[]>; createSaleMetadata: (signatureResult: any, publicKey: string, data: any) => Promise<any>; getCreateSaleEvents: () => Promise<{ guid: { creation_number: string; account_address: string; }; sequence_number: string; type: string; data: any; }[]>; getContributeEvents: () => Promise<{ guid: { creation_number: string; account_address: string; }; sequence_number: string; type: string; data: any; }[]>; genFinalizePayload: (account: HexString, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, creator: string, id: string, dex_type: number, module_address: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; finalize: (account: AptosAccount, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, creator: string, id: string, dex_type: number, module_address: string | undefined) => Promise<string>; genFinalizePresalePayload: (account: HexString, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, creator: string, id: string, module_address: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; finalizePresale: (account: AptosAccount, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, creator: string, id: string, module_address: string | undefined) => Promise<string>; genMintNftPayload: (account: HexString, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, creator: string, id: string, module_address: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; mintNft: (account: AptosAccount, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, creator: string, id: string, module_address: string | undefined) => Promise<string>; genRefundPayload: (account: HexString, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, creator: string, id: string, module_address: string | undefined) => Promise<TxnBuilderTypes.RawTransaction>; refund: (account: AptosAccount, saleCoinTypeAddress: string, purchaseCoinTypeAddress: string, creator: string, id: string, module_address: string | undefined) => Promise<string>; } //# sourceMappingURL=proton_sale_client.d.ts.map