Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
update godwoken-schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
RetricSu committed Jul 1, 2021
1 parent 0e0600d commit b0010ef
Show file tree
Hide file tree
Showing 5 changed files with 6,293 additions and 6,435 deletions.
62 changes: 21 additions & 41 deletions packages/godwoken/schemas/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,6 @@ export interface UnionType {
value: any;
}

export function SerializeByte32Opt(value: CanCastToArrayBuffer | null): ArrayBuffer;
export class Byte32Opt {
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
validate(compatible?: boolean): void;
value(): Byte32;
hasValue(): boolean;
}

export function SerializeByte20(value: CanCastToArrayBuffer): ArrayBuffer;
export class Byte20 {
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
validate(compatible?: boolean): void;
indexAt(i: number): number;
raw(): ArrayBuffer;
static size(): Number;
}

export function SerializeSignature(value: CanCastToArrayBuffer): ArrayBuffer;
export class Signature {
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
validate(compatible?: boolean): void;
indexAt(i: number): number;
raw(): ArrayBuffer;
static size(): Number;
}

export function SerializeBlockMerkleState(value: object): ArrayBuffer;
export class BlockMerkleState {
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
Expand Down Expand Up @@ -86,7 +60,6 @@ export class RollupConfig {
getRequiredStakingCapacity(): Uint64;
getChallengeMaturityBlocks(): Uint64;
getFinalityBlocks(): Uint64;
getCompatibleChainId(): Uint32;
getRewardBurnRate(): number;
getAllowedEoaTypeHashes(): Byte32Vec;
getAllowedContractTypeHashes(): Byte32Vec;
Expand All @@ -107,7 +80,7 @@ export class L2Transaction {
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
validate(compatible?: boolean): void;
getRaw(): RawL2Transaction;
getSignature(): Signature;
getSignature(): Bytes;
}

export function SerializeL2TransactionVec(value: Array<object>): ArrayBuffer;
Expand Down Expand Up @@ -204,6 +177,7 @@ export class RawWithdrawalRequest {
getSellCapacity(): Uint64;
getOwnerLockHash(): Byte32;
getPaymentLockHash(): Byte32;
getFee(): Fee;
}

export function SerializeWithdrawalRequestVec(value: Array<object>): ArrayBuffer;
Expand All @@ -218,9 +192,8 @@ export function SerializeWithdrawalRequest(value: object): ArrayBuffer;
export class WithdrawalRequest {
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
validate(compatible?: boolean): void;
static size(): Number;
getRaw(): RawWithdrawalRequest;
getSignature(): Signature;
getSignature(): Bytes;
}

export function SerializeKVPair(value: object): ArrayBuffer;
Expand Down Expand Up @@ -336,11 +309,21 @@ export class MetaContractArgs {
value(): any;
}

export function SerializeFee(value: object): ArrayBuffer;
export class Fee {
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
validate(compatible?: boolean): void;
static size(): Number;
getSudtId(): Uint32;
getAmount(): Uint128;
}

export function SerializeCreateAccount(value: object): ArrayBuffer;
export class CreateAccount {
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
validate(compatible?: boolean): void;
getScript(): Script;
getFee(): Fee;
}

export function SerializeSUDTArgs(value: UnionType): ArrayBuffer;
Expand All @@ -355,16 +338,14 @@ export function SerializeSUDTQuery(value: object): ArrayBuffer;
export class SUDTQuery {
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
validate(compatible?: boolean): void;
static size(): Number;
getAccountId(): Uint32;
getShortAddress(): Bytes;
}

export function SerializeSUDTTransfer(value: object): ArrayBuffer;
export class SUDTTransfer {
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
validate(compatible?: boolean): void;
static size(): Number;
getTo(): Uint32;
getTo(): Bytes;
getAmount(): Uint128;
getFee(): Uint128;
}
Expand Down Expand Up @@ -443,8 +424,8 @@ export class VerifyTransactionWitness {
getContext(): VerifyTransactionContext;
}

export function SerializeVerifySignatureContext(value: object): ArrayBuffer;
export class VerifySignatureContext {
export function SerializeVerifyTransactionSignatureContext(value: object): ArrayBuffer;
export class VerifyTransactionSignatureContext {
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
validate(compatible?: boolean): void;
getAccountCount(): Uint32;
Expand All @@ -456,23 +437,20 @@ export function SerializeVerifyTransactionSignatureWitness(value: object): Array
export class VerifyTransactionSignatureWitness {
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
validate(compatible?: boolean): void;
getL2Tx(): L2Transaction;
getRawL2Block(): RawL2Block;
getL2Tx(): L2Transaction;
getTxProof(): Bytes;
getKvStateProof(): Bytes;
getBlockHashesProof(): Bytes;
getContext(): VerifySignatureContext;
getContext(): VerifyTransactionSignatureContext;
}

export function SerializeVerifyWithdrawalWitness(value: object): ArrayBuffer;
export class VerifyWithdrawalWitness {
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
validate(compatible?: boolean): void;
getRawL2Block(): RawL2Block;
getKvStateProof(): Bytes;
getWithdrawalRequest(): WithdrawalRequest;
getWithdrawalProof(): Bytes;
getContext(): VerifySignatureContext;
}

export function SerializeRollupSubmitBlock(value: object): ArrayBuffer;
Expand Down Expand Up @@ -542,6 +520,8 @@ export class Uint64 {
validate(compatible?: boolean): void;
indexAt(i: number): number;
raw(): ArrayBuffer;
toBigEndianUint64(): BigInt;
toLittleEndianUint64(): BigInt;
static size(): Number;
}

Expand Down
Loading

0 comments on commit b0010ef

Please sign in to comment.