@river-build/web3
Version:
Dapps for our Space and Registry contracts
59 lines • 3.76 kB
TypeScript
import { ethers } from 'ethers';
import { PublicClient } from 'viem';
import { PricingModuleStruct } from './ContractTypes';
import { ISpaceDapp } from './ISpaceDapp';
export declare const ETH_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
export declare const EVERYONE_ADDRESS = "0x0000000000000000000000000000000000000001";
export declare const MOCK_ADDRESS = "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef";
export declare const MOCK_ADDRESS_2 = "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbee2";
export declare const MOCK_ADDRESS_3 = "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbee3";
export declare const MOCK_ADDRESS_4 = "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbee4";
export declare const MOCK_ADDRESS_5 = "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbee5";
export declare class NoEntitledWalletError extends Error {
constructor();
/**
* throwIfRuntimeErrors is a helper function to process AggregateErrors emitted from Promise.any that may
* contain promises rejected with NoEntitledWalletErrors, which represent an entitlement check that evaluates
* to false, and not a true error condition. This method will filter out NoEntitledWalletErrors and throw an
* AggregateError with the remaining errors, if any exist. Otherwise, it will simply return undefined.
* @param error AggregateError
* @returns undefined
* @throws AggregateError
*/
static throwIfRuntimeErrors: (error: AggregateError) => undefined;
}
export declare function isEthersProvider(provider: ethers.providers.Provider | PublicClient): provider is ethers.providers.Provider;
export declare function isPublicClient(provider: ethers.providers.Provider | PublicClient): provider is PublicClient;
export declare function SpaceAddressFromSpaceId(spaceId: string): string;
export declare function SpaceIdFromSpaceAddress(spaceAddress: string): string;
/**
* Use this function in the default case of a exhaustive switch statement to ensure that all cases are handled.
* Always throws JSON RPC error.
* @param value Switch value
* @param message Error message
* @param code JSON RPC error code
* @param data Optional data to include in the error
*/
export declare function checkNever(value: never, message?: string): never;
/**
* @deprecated
* Use TIERED_PRICING_ORACLE_V2 or TIERED_PRICING_ORACLE_V3 instead
* Yes, the correct value for this constant is "TieredLogPricingOracleV2"
*/
export declare const TIERED_PRICING_ORACLE = "TieredLogPricingOracleV2";
export declare const TIERED_PRICING_ORACLE_V2 = "TieredLogPricingOracleV2";
export declare const TIERED_PRICING_ORACLE_V3 = "TieredLogPricingOracleV3";
export declare const FIXED_PRICING = "FixedPricing";
export declare const getDynamicPricingModule: (spaceDapp: ISpaceDapp | undefined) => Promise<import("@river-build/generated/dev/typings/IPricingModules").IPricingModulesBase.PricingModuleStruct>;
export declare const getFixedPricingModule: (spaceDapp: ISpaceDapp | undefined) => Promise<import("@river-build/generated/dev/typings/IPricingModules").IPricingModulesBase.PricingModuleStruct>;
export declare const findDynamicPricingModule: (pricingModules: PricingModuleStruct[]) => import("@river-build/generated/dev/typings/IPricingModules").IPricingModulesBase.PricingModuleStruct | undefined;
export declare const findFixedPricingModule: (pricingModules: PricingModuleStruct[]) => import("@river-build/generated/dev/typings/IPricingModules").IPricingModulesBase.PricingModuleStruct | undefined;
export declare function stringifyChannelMetadataJSON({ name, description, }: {
name: string;
description: string;
}): string;
export declare function parseChannelMetadataJSON(metadataStr: string): {
name: string;
description: string;
};
//# sourceMappingURL=Utils.d.ts.map