@antefinance/ante-sdk
Version:
Library for interacting with Ante smart contracts
212 lines • 5.87 kB
TypeScript
export type HashTreeIndexVersion = 'v1' | 'v2';
export type GrantPoolVersion = 'v01' | 'v2' | 'v2Alpha';
export type USD1Version = 'v1';
export type TaskPoolVersion = 'v01';
export type IOUVersion = 'v1';
export type GiveawayPoolVersion = 'v01';
export type MetaPoolVersion = 'v01' | 'v002' | 'v001';
export type Version = 'v0.5' | 'v0.5.1' | 'v0.5.2' | 'v0.6';
export type DTSVersion = 'v1';
export type TestTokenVersion = 'v1';
export declare enum Network {
mainnet = "mainnet",
rinkeby = "rinkeby",
goerli = "goerli",
sepolia = "sepolia",
binance = "binance",
binanceTestnet = "binanceTestnet",
polygon = "polygon",
arbitrumOne = "arbitrumOne",
arbitrumGoerli = "arbitrumGoerli",
avalanche = "avalanche",
avalancheFuji = "avalancheFuji",
mumbai = "mumbai",
fantom = "fantom",
fantomTestnet = "fantomTestnet",
scrollL1Testnet = "scrollL1Testnet",
scrollL2Testnet = "scrollL2Testnet",
scrollAlphaTestnet = "scrollAlphaTestnet",
optimism = "optimism",
optimismGoerli = "optimismGoerli",
aurora = "aurora",
auroraTestnet = "auroraTestnet",
zksyncGoerli = "zksyncGoerli",
zksyncEra = "zksyncEra",
base = "base",
baseSepolia = "baseSepolia"
}
export declare enum ChainId {
mainnet = 1,
rinkeby = 4,
goerli = 5,
sepolia = 11155111,
optimism = 10,
binance = 56,
binanceTestnet = 97,
polygon = 137,
fantom = 250,
optimismGoerli = 420,
fantomTestnet = 4002,
arbitrumOne = 42161,
arbitrumGoerli = 421613,
avalanche = 43114,
avalancheFuji = 43113,
mumbai = 80001,
scrollL1Testnet = 534351,
scrollL2Testnet = 534354,
scrollAlphaTestnet = 534353,
aurora = 1313161554,
auroraTestnet = 1313161555,
zksyncGoerli = 280,
zksyncEra = 324,
base = 8453,
baseSepolia = 84532
}
export type DefaultProviderKeys = {
etherscan?: string;
infura?: string;
alchemy?: string;
};
export type ContractVersion = {
[key in 'default' | Version | DTSVersion | MetaPoolVersion | GrantPoolVersion]?: any;
};
export declare enum CommitmentStatus {
NONE = 0,
OPEN = 1,
ACTIVE = 2,
SETTLED = 3,
NO_WINNER = 4
}
export type TokenDetails = {
name: string;
symbol: string;
decimals: number;
eip712Version: string;
};
export declare enum CommitmentPartySide {
COMMITTER = "committer",
COUNTERPARTY = "counterparty"
}
export declare enum EncoderCommitmentPartySide {
COMMITTER = 0,
COUNTERPARTY = 1
}
export declare enum CommitmentStakeValueType {
STRING = "string",
TOKENS = "tokens"
}
export type TokensCommitmentStakeValue = {
chainId: number;
token: string;
amount: string;
};
export declare enum CommitmentStakeType {
ONE_WAY_PENALTY = "one-way-penalty",
ONE_WAY_REWARD = "one-way-reward",
TWO_WAY = "two-way",
NONE = "none"
}
export declare enum EncoderCommitmentStakeType {
ONE_WAY_PENALTY = 0,
ONE_WAY_REWARD = 1,
TWO_WAY = 2,
NONE = 3
}
export type BaseCommitmentStake = {
type: CommitmentStakeType;
formatted: string;
};
export type TextCommitmentStake = BaseCommitmentStake & {
valueType: CommitmentStakeValueType.STRING;
value: Partial<Record<CommitmentPartySide, string>>;
};
export type TokensCommitmentStake = BaseCommitmentStake & {
valueType: CommitmentStakeValueType.TOKENS;
value: Partial<Record<CommitmentPartySide, TokensCommitmentStakeValue>>;
};
export type CommitmentStake = TextCommitmentStake | TokensCommitmentStake;
export declare enum CommitmentType {
ANTE = "myante",
MESSAGE = "message",
ANTE_TEST = "ante-test",
EVIDENCE = "evidence",
ANTE_PRO = "myante-pro",
ANTE_GRANT = "ante-grant",
ANTE_GIVEAWAY = "ante-giveaway"
}
export declare enum EncoderCommitmentType {
ANTE = 0,
MESSAGE = 1,
ANTE_TEST = 2,
EVIDENCE = 3,
ANTE_PRO = 4,
ANTE_GRANT = 5,
ANTE_GIVEAWAY = 6
}
export declare enum EncoderCommitmentOutcome {
NONE = 0,
KEPT = 1,
BROKEN = 2,
UNDETERMINED = 3
}
export declare enum EncoderCommitmentParticipantSide {
NONE = 0,
A = 1,
B = 2
}
export type BaseCommitment = {
anteId: string;
commitmentType: CommitmentType;
chainId?: number;
committedAt: string | number | Date;
predictedSubmissionBlockNumber: number;
actualSubmissionBlockNumber?: number;
};
export type AnteCommitment = BaseCommitment & {
commitmentType: CommitmentType.ANTE;
endDate: string | number | Date;
payload: string;
committerSignature: string;
committer: string;
counterparty: string;
settler: string;
settlerData: string;
stake: CommitmentStake;
};
export type MessageCommitment = BaseCommitment & {
commitmentType: CommitmentType.MESSAGE;
payload: string;
committerSignature: string;
committer: string;
};
export type AnteProCommitment = BaseCommitment & {
commitmentType: CommitmentType.ANTE_PRO;
endDate: string | number | Date;
payload: string;
firstParticipantA: string;
firstParticipantB: string;
settler: string;
settlerData: string;
stake: TokensCommitmentStake;
};
export type AnteGrantCommitment = BaseCommitment & {
commitmentType: CommitmentType.ANTE_GRANT;
endDate: string | number | Date;
payload: string;
settler: string;
settlerData: string;
};
export type AnteGiveawayCommitment = BaseCommitment & {
commitmentType: CommitmentType.ANTE_GIVEAWAY;
endDate: string | number | Date;
payload: string;
settler: string;
settlerData: string;
};
export type Commitment = AnteCommitment | MessageCommitment | AnteProCommitment | AnteGrantCommitment | AnteGiveawayCommitment;
export declare enum GateTypeEnum {
NFT = "nft",
ALLOWLIST = "allowlist",
ZUPASS = "zupass"
}
//# sourceMappingURL=index.d.ts.map