Skip to content

Releases: midcontract/protocol

v1.0.0-rc.25

20 May 08:46
7a032b5
Compare
Choose a tag to compare
v1.0.0-rc.25 Pre-release
Pre-release
npm install --save @midcontract/protocol@1.0.0-rc.25

fullFee key was changed to feeConfig which is enum:

export enum FeeConfig {
  CLIENT_COVERS_ALL,
  CLIENT_COVERS_ONLY,
  CONTRACTOR_COVERS_CLAIM,
  NO_FEES,
}

SDK methods updates:

  • escrowDeposit() changed input from
export interface DepositInput {
  depositId: bigint;
  token?: SymbolToken;
  amount: number;
  timeLock?: bigint;
  fullFee?: boolean;
  recipientData: Hash;
}

to

export interface DepositInput {
 contractorAddress: Address;
 token: SymbolToken;
 amount: number;
 amountToClaim?: number;
 timeLock?: bigint;
 recipientData: Hash;
 feeConfig: FeeConfig;
 status?: DepositStatus;
}
  • new method deploy(adminAddress), on user's first deposit, before deposit itself, this method should be called in order to deploy a proxy smart contract per user, returns new user smart contract address and salt, both 2 fields should be stored in db.
  • escrowDepositAmount(amount: number, feeConfig: FeeConfig = 1, tokenSymbol: SymbolToken = "MockUSDT") added new field to input, feeConfig, for now feeConfig has default value CLIENT_COVERS_ONLY
  • escrowMakeDataHash(data: string, salt: Hash) added new required field in input - salt
  • escrowDeposit(input: DepositInput, waitReceipt = true) input param changed due to change of deposit interface in SDK, output -> added new field contractId that should be stored in deposit/contract entity in db. This value changed old value -> depositId, and should be used in all methods after deposit (submit, approve, refill, claim, withdraw)

v1.0.0-rc.24

02 Apr 13:17
ca0b349
Compare
Choose a tag to compare
v1.0.0-rc.24 Pre-release
Pre-release
npm install --save @midcontract/protocol@=1.0.0-rc.24

1.0.0-rc.19

19 Mar 14:41
55c30d0
Compare
Choose a tag to compare
1.0.0-rc.19 Pre-release
Pre-release
npm install --save @midcontract/protocol@1.0.0-rc.19
class MidcontractProtocol {
 escrowRefill(depositId: bigint, value: number): Promise<TransactionStatus>;
}

v1.0.0-rc.18

14 Mar 10:33
523a0f9
Compare
Choose a tag to compare
v1.0.0-rc.18 Pre-release
Pre-release
npm install --save @midcontract/protocol@1.0.0-rc.18

Added new methods for getting links to the explorer:

class MidcontractProtocol {
  transactionUrl(transactionHash: Hash): string;
  accountUrl(account: Address): string;
}

1.0.0-rc.9

16 Feb 08:53
f822d5b
Compare
Choose a tag to compare
1.0.0-rc.9 Pre-release
Pre-release
feat: new implementation SDK