import { ethers } from 'ethers'; import type { PayableOverrides } from 'ethers'; import { Agreement as AgreementContract, SetRoleItemStruct, PromiseOrValue } from '../generated/agreement.generated'; import { MeemAPI } from '../generated/api.generated'; export interface ICreateAgreementBaseOptions { /** Default: true. When set to false will call the contract directly. Will require the user to pay gas. */ useMeemAPI?: boolean; /** Required when useMeemAPI===false. The proxy contract id from EPM to deploy and initialize. */ proxyContractId?: string; /** Required when useMeemAPI===false. The bundle contract id from EPM to use with the proxy contract. */ bundleId?: string; /** Required when useMeemAPI===false. The signer to use to deploy the contract. */ signer?: ethers.Signer; /** Required when useMeemAPI===false. The URI containing metadata for the contract. */ contractURI?: string; /** Optional when useMeemAPI===false. Sets roles at the contract level. */ roles?: SetRoleItemStruct[]; } export declare const getAgreementContract: (options: { /** The contract address */ address: string; /** The abi to use. If omitted will use the latest version Agreement abi. */ abi?: Record[] | undefined; /** The signer to use. If omitted will use the default signer. */ signer: ethers.Signer; }) => AgreementContract; export declare class Agreement { private jwt?; private gqlHttpUrl?; private gqlWsUri?; private apiUrl?; constructor(options: { jwt?: string; apiUrl?: string; gqlHttpUrl?: string; gqlWsUri?: string; }); /** Sets the JWT used in api calls */ setJwt(jwt?: string): void; isAdmin(options: { agreementId: string; }): Promise; /** Create a new agreement */ createAgreement(options: ICreateAgreementBaseOptions & MeemAPI.v1.CreateAgreement.IRequestBody): Promise; /** Re-initialize the contract and change the contract settings. */ reInitialize(options: { /** The agreement to update */ agreementId: string; /** The name of the contract */ name?: string; /** The max number of tokens */ maxSupply?: string; /** Agreement contract metadata */ metadata?: MeemAPI.IMeemMetadataLike; /** The contract symbol. If omitted, will use slug generated from name */ symbol?: string; /** Contract admin addresses */ admins?: string[]; /** Special minter permissions */ minters?: string[]; /** Minting permissions */ mintPermissions?: Omit[]; /** Splits for minting / transfers */ splits?: MeemAPI.IMeemSplit[]; /** Whether tokens can be transferred */ isTransferLocked?: boolean; }): Promise; /** Bulk mint tokens */ bulkMint(options: { agreementId: string; tokens: { /** The token metadata */ metadata?: MeemAPI.IMeemMetadataLike; /** The address where the token will be minted */ to: string; }[]; }): Promise; /** Bulk burn tokens */ bulkBurn(options: { agreementId: string; tokenIds: string[]; }): Promise; /** Bulk burn agreement role tokens */ bulkBurnAgreementRoleTokens(options: { /** The id of the agreement */ agreementId: string; /** The id of the agreement role */ agreementRoleId: string; tokenIds: string[]; }): Promise; /** Mint a token directly on the contract. */ mint(options: { /** The wallet used to mint the token */ signer: ethers.Signer; /** The agreement contract address */ address: string; /** * The token metadata. * Will save the metadata on-chain. * * If you're saving large metadata, it's recommended you save to IPFS first * and then pass tokenURI instead * * Required if tokenURI is not specified. */ metadata?: MeemAPI.IMeemMetadataLike; /** The token URI. Required if metadata is not specified. */ tokenURI?: string; /** The address where the token will be minted */ to: string; /** The token type */ tokenType?: MeemAPI.MeemType; /** Wait for the transaction to complete before returning. Default true. */ shouldWait?: boolean; /** Transaction overrides */ overrides?: PayableOverrides & { from?: PromiseOrValue; }; }): Promise; /** Update off-chain agreement data */ updateAgreement(options: MeemAPI.v1.UpdateAgreement.IRequestBody & { /** The agreement */ agreementId: string; }): Promise; /** Fetch the merkle proof required for this user to mint. */ getMintingProof(options: { /** The agreement */ agreementId: string; /** The address where the token will be minted */ to: string; }): Promise; /** Upgrade an agreement */ upgradeAgreement(options: { /** The agreement to upgrade */ agreementId: string; /** Specify the bundle id to upgrade to. Defaults to latest Agreements bundle */ bundleId?: string; }): Promise; /** Create a new agreement */ createSafe(options: { /** The agreement to create the club safe for */ agreementId: string; /** Addresses of the safe owners */ safeOwners: string[]; /** Set the chain where the safe should be created. Defaults to the chain where the agreement lives. */ chainId?: number; /** The number of signatures required */ threshold?: number; }): Promise; /** Sets the address of the Agreement safe */ setSafeAddress(options: { /** The agreement */ agreementId: string; /** The safe address */ address: string; }): Promise; /** Set the agreement admin role */ setAgreementAdminRole(options: { /** The agreement */ agreementId: string; /** The id of the agreement role to set as agreement admin role */ adminAgreementRoleId: string; }): Promise; /** Create a new agreement */ createAgreementRole(options: ICreateAgreementBaseOptions & MeemAPI.v1.CreateAgreementRole.IRequestBody & { /** The id of the agreement */ agreementId: string; }): Promise; /** Re-initialize the contract and change the contract settings. */ reInitializeAgreementRole(options: { /** The id of the agreement */ agreementId: string; /** The id of the agreement role */ agreementRoleId: string; /** The name of the contract */ name?: string; /** The max number of tokens */ maxSupply?: string; /** Agreement role contract metadata */ metadata?: MeemAPI.IMeemMetadataLike; /** The contract symbol. If omitted, will use slug generated from name */ symbol?: string; /** Splits for minting / transfers */ splits?: MeemAPI.IMeemSplit[]; /** Whether tokens can be transferred */ isTransferLocked?: boolean; }): Promise; /** Upgrade an agreement role */ upgradeAgreementRole(options: { /** The id of the agreement */ agreementId: string; /** The agreement role to upgrade */ agreementRoleId: string; /** Specify the bundle id to upgrade to. Defaults to latest Agreements bundle */ bundleId?: string; }): Promise; /** Bulk mint agreement role tokens */ bulkMintAgreementRoleTokens(options: { /** The id of the agreement */ agreementId: string; /** The id of the agreement role */ agreementRoleId: string; tokens: { /** The token metadata */ metadata?: MeemAPI.IMeemMetadataLike; /** The address where the token will be minted */ to: string; }[]; }): Promise; /** Create an agreement extension */ createAgreementExtension(options: { /** The id of the agreement */ agreementId: string; /** The id of the extension to enable */ extensionId: string; /** Optional metadata associated with this extension */ metadata?: MeemAPI.IMeemMetadataLike; /** Optional external link associated with this extension */ externalLink?: { /** Url for the link */ url: string; /** The link label */ label?: string; /** Visibility of the link extension */ visibility?: MeemAPI.AgreementExtensionVisibility; }; /** Optional widget data associated with this extension */ widget?: { /** Metadata associated with the extension widget */ metadata?: MeemAPI.IMeemMetadataLike; /** Visibility of the extension widget */ visibility?: MeemAPI.AgreementExtensionVisibility; }; }): Promise; /** Update an agreement extension */ updateAgreementExtension(options: { /** The id of the agreement */ agreementId: string; /** The agreement extension id */ agreementExtensionId: string; /** Optional metadata associated with this extension */ metadata?: MeemAPI.IMeemMetadataLike; /** Optional external link associated with this extension */ externalLink?: { /** Url for the link */ url: string; /** The link label */ label?: string; /** Visibility of the link extension */ visibility?: MeemAPI.AgreementExtensionVisibility; }; /** Optional widget data associated with this extension */ widget?: { /** Whether widget should be enabled */ isEnabled: boolean; /** Metadata associated with the extension widget */ metadata?: MeemAPI.IMeemMetadataLike; }; }): Promise; }