@midcontract/protocol
Advanced tools
Comparing version 1.0.0-rc.29-1bbec05 to 1.0.0-rc.29-2aa5b63
@@ -42,11 +42,16 @@ // Generated by dts-bundle-generator v9.3.1 | ||
declare enum FeeConfig { | ||
CLIENT_COVERS_ALL = 0, | ||
CLIENT_COVERS_ONLY = 1, | ||
CONTRACTOR_COVERS_CLAIM = 2, | ||
CLIENT_COVERS_ALL = 0,// Client covers all fees | ||
CLIENT_COVERS_ONLY = 1,// Client pays only for his fee | ||
CONTRACTOR_COVERS_CLAIM = 2,// Client covers only freelancer's claim fee | ||
NO_FEES = 3 | ||
} | ||
declare enum RefillType { | ||
PREPAYMENT = 0,// Indicates a refill to the contract's general prepayment pool, which can be used to cover future claims. | ||
WEEK_PAYMENT = 1 | ||
} | ||
declare enum DisputeWinner { | ||
CLIENT = 0, | ||
CONTRACTOR = 1, | ||
SPLIT = 2 | ||
NONE = 0, | ||
CLIENT = 1, | ||
CONTRACTOR = 2, | ||
SPLIT = 3 | ||
} | ||
@@ -111,2 +116,8 @@ declare class Deposit { | ||
} | ||
export interface HourlyDepositInput { | ||
contractorAddress: Address; | ||
amountToClaim?: number; | ||
amountToWithdraw?: number; | ||
feeConfig: FeeConfig; | ||
} | ||
export interface ApproveInput { | ||
@@ -133,2 +144,5 @@ contractId: bigint; | ||
} | ||
export interface ApproveByAdminInputHourly extends ApproveInputHourly { | ||
initializeNewWeek: boolean; | ||
} | ||
export type TransactionStatus = "pending" | "success" | "reverted"; | ||
@@ -169,3 +183,3 @@ export interface TransactionData { | ||
private readonly feeManagerEscrow; | ||
private readonly ownerAddress; | ||
private readonly managerAddress; | ||
fixedPriceAbi: [ | ||
@@ -190,4 +204,4 @@ ]; | ||
escrowClaimableAmount(amount: number, feeConfig?: FeeConfig, tokenSymbol?: SymbolToken): Promise<ClaimableAmount>; | ||
getCoverageFee(): Promise<number>; | ||
getClaimFee(): Promise<number>; | ||
getCoverageFee(wallet: Hash): Promise<number>; | ||
getClaimFee(wallet: Hash): Promise<number>; | ||
getMaxBPS(): Promise<number>; | ||
@@ -199,2 +213,3 @@ getDepositList(contractId: bigint): Promise<Deposit>; | ||
currentContractIdMilestone(): Promise<bigint>; | ||
currentContractIdHourly(): Promise<bigint>; | ||
get blockNumber(): Promise<number>; | ||
@@ -213,15 +228,16 @@ get account(): Account; | ||
escrowDeposit(input: DepositInput, waitReceipt?: boolean): Promise<DepositResponse>; | ||
escrowMilestoneDeposit(deposits: DepositInput[], token: SymbolToken, escrowContractId?: bigint, waitReceipt?: boolean): Promise<DepositResponse>; | ||
escrowDepositHourly(deposits: DepositInput[], token: SymbolToken, escrowContractId?: bigint, waitReceipt?: boolean): Promise<DepositResponse>; | ||
escrowMilestoneDeposit(deposits: DepositInput[], tokenSymbol: SymbolToken, escrowContractId?: bigint, waitReceipt?: boolean): Promise<DepositResponse>; | ||
escrowDepositHourly(tokenSymbol: SymbolToken, prepaymentAmount: number | undefined, escrowContractId: bigint | undefined, deposit: HourlyDepositInput, waitReceipt?: boolean): Promise<DepositResponse>; | ||
escrowSubmit(contractId: bigint, salt: Hash, data: string, waitReceipt?: boolean): Promise<TransactionId>; | ||
escrowSubmitMilestone(contractId: bigint, milestoneId: bigint, salt: Hash, data: string, waitReceipt?: boolean): Promise<TransactionId>; | ||
escrowSubmitHourly(contractId: bigint, weekId: bigint, salt: Hash, data: string, waitReceipt?: boolean): Promise<TransactionId>; | ||
escrowRefill(contractId: bigint, value: number, waitReceipt?: boolean): Promise<TransactionId>; | ||
escrowRefillMilestone(contractId: bigint, milestoneId: bigint, value: number, waitReceipt?: boolean): Promise<TransactionId>; | ||
escrowRefillHourly(contractId: bigint, weekId: bigint, value: number, waitReceipt?: boolean): Promise<TransactionId>; | ||
escrowRefillHourly(contractId: bigint, weekId: bigint, value: number, refillType: RefillType, waitReceipt?: boolean): Promise<TransactionId>; | ||
escrowApprove(input: ApproveInput, waitReceipt?: boolean): Promise<TransactionId>; | ||
escrowApproveMilestone(input: ApproveInputMilestone, waitReceipt?: boolean): Promise<TransactionId>; | ||
escrowApproveHourly(input: ApproveInputHourly, waitReceipt?: boolean): Promise<TransactionId>; | ||
escrowApproveByAdminHourly(input: ApproveByAdminInputHourly, waitReceipt?: boolean): Promise<TransactionId>; | ||
escrowClaim(contractId: bigint, waitReceipt?: boolean): Promise<TransactionId>; | ||
escrowClaimMilestone(contractId: bigint, milestoneId: bigint, waitReceipt?: boolean): Promise<TransactionId>; | ||
escrowClaimAllMilestone(contractId: bigint, startMilestoneId: bigint, endMilestoneId: bigint, waitReceipt?: boolean): Promise<TransactionId>; | ||
escrowClaimHourly(contractId: bigint, weekId: bigint, waitReceipt?: boolean): Promise<TransactionId>; | ||
@@ -246,2 +262,3 @@ escrowWithdraw(contractId: bigint, waitReceipt?: boolean): Promise<TransactionId>; | ||
resolveDisputeHourly(contractId: bigint, weekId: bigint, winner: DisputeWinner, clientAmount: number, contractorAmount: number, waitReceipt?: boolean): Promise<TransactionId>; | ||
mintMockUSDTTokens(): Promise<TransactionId>; | ||
deployEscrow(): Promise<{ | ||
@@ -248,0 +265,0 @@ userEscrow: Address; |
{ | ||
"name": "@midcontract/protocol", | ||
"version": "1.0.0-rc.29-1bbec05", | ||
"version": "1.0.0-rc.29-2aa5b63", | ||
"description": "Crypto payment protocol with escrow", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
699838
13906