@roochnetwork/rooch-sdk
Version:
284 lines (283 loc) • 11.8 kB
TypeScript
import { Authenticator } from '../crypto/index.js';
import { address, Bytes, u64 } from '../types/index.js';
import { CallFunctionArgs } from './types.js';
export declare class Transaction {
private data;
private auth;
private info;
callFunction(input: {
info?: string;
} & CallFunctionArgs): void;
getInfo(): string | undefined;
getMaxGas(): bigint | undefined;
setMaxGas(input: number): void;
setSender(input: address): void;
setAuth(input: Authenticator): void;
setChainId(input: u64): void;
setSeqNumber(input: u64): void;
hashData(): Bytes;
encodeData(): import("@mysten/bcs").SerializedBcs<{
sender: string;
sequenceNumber: string;
chainId: string;
maxGas: string;
action: {
readonly [x: number]: string;
toString: () => string;
charAt: (pos: number) => string;
charCodeAt: (index: number) => number;
concat: (...strings: string[]) => string;
indexOf: (searchString: string, position?: number) => number;
lastIndexOf: (searchString: string, position?: number) => number;
localeCompare: {
(that: string): number;
(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number;
};
match: {
(regexp: string | RegExp): RegExpMatchArray | null;
(matcher: {
[Symbol.match](string: string): RegExpMatchArray | null;
}): RegExpMatchArray | null;
};
replace: {
(searchValue: string | RegExp, replaceValue: string): string;
(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
(searchValue: {
[Symbol.replace](string: string, replaceValue: string): string;
}, replaceValue: string): string;
(searchValue: {
[Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
}, replacer: (substring: string, ...args: any[]) => string): string;
};
search: {
(regexp: string | RegExp): number;
(searcher: {
[Symbol.search](string: string): number;
}): number;
};
slice: (start?: number, end?: number) => string;
split: {
(separator: string | RegExp, limit?: number): string[];
(splitter: {
[Symbol.split](string: string, limit?: number): string[];
}, limit?: number): string[];
};
substring: (start: number, end?: number) => string;
toLowerCase: () => string;
toLocaleLowerCase: {
(locales?: string | string[]): string;
(locales?: Intl.LocalesArgument): string;
};
toUpperCase: () => string;
toLocaleUpperCase: {
(locales?: string | string[]): string;
(locales?: Intl.LocalesArgument): string;
};
trim: () => string;
readonly length: number;
substr: (from: number, length?: number) => string;
valueOf: () => string;
codePointAt: (pos: number) => number | undefined;
includes: (searchString: string, position?: number) => boolean;
endsWith: (searchString: string, endPosition?: number) => boolean;
normalize: {
(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
(form?: string): string;
};
repeat: (count: number) => string;
startsWith: (searchString: string, position?: number) => boolean;
anchor: (name: string) => string;
big: () => string;
blink: () => string;
bold: () => string;
fixed: () => string;
fontcolor: (color: string) => string;
fontsize: {
(size: number): string;
(size: string): string;
};
italics: () => string;
link: (url: string) => string;
small: () => string;
strike: () => string;
sub: () => string;
sup: () => string;
padStart: (maxLength: number, fillString?: string) => string;
padEnd: (maxLength: number, fillString?: string) => string;
trimEnd: () => string;
trimStart: () => string;
trimLeft: () => string;
trimRight: () => string;
matchAll: (regexp: RegExp) => RegExpStringIterator<RegExpExecArray>;
replaceAll: {
(searchValue: string | RegExp, replaceValue: string): string;
(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
};
at: (index: number) => string | undefined;
isWellFormed: () => boolean;
toWellFormed: () => string;
[Symbol.iterator]: () => StringIterator<string>;
kind: "$kind" | "ScriptCall" | "CallFunction";
} | {
code: number[];
args: number[];
typeArgs: string[];
kind: "$kind" | "ScriptCall" | "CallFunction";
} | {
functionId: {
moduleId: {
address: string;
name: string;
};
name: string;
};
typeArgs: string[];
args: number[][];
kind: "$kind" | "ScriptCall" | "CallFunction";
} | {
readonly [x: number]: string;
toString: () => string;
charAt: (pos: number) => string;
charCodeAt: (index: number) => number;
concat: (...strings: string[]) => string;
indexOf: (searchString: string, position?: number) => number;
lastIndexOf: (searchString: string, position?: number) => number;
localeCompare: {
(that: string): number;
(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number;
};
match: {
(regexp: string | RegExp): RegExpMatchArray | null;
(matcher: {
[Symbol.match](string: string): RegExpMatchArray | null;
}): RegExpMatchArray | null;
};
replace: {
(searchValue: string | RegExp, replaceValue: string): string;
(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
(searchValue: {
[Symbol.replace](string: string, replaceValue: string): string;
}, replaceValue: string): string;
(searchValue: {
[Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
}, replacer: (substring: string, ...args: any[]) => string): string;
};
search: {
(regexp: string | RegExp): number;
(searcher: {
[Symbol.search](string: string): number;
}): number;
};
slice: (start?: number, end?: number) => string;
split: {
(separator: string | RegExp, limit?: number): string[];
(splitter: {
[Symbol.split](string: string, limit?: number): string[];
}, limit?: number): string[];
};
substring: (start: number, end?: number) => string;
toLowerCase: () => string;
toLocaleLowerCase: {
(locales?: string | string[]): string;
(locales?: Intl.LocalesArgument): string;
};
toUpperCase: () => string;
toLocaleUpperCase: {
(locales?: string | string[]): string;
(locales?: Intl.LocalesArgument): string;
};
trim: () => string;
readonly length: number;
substr: (from: number, length?: number) => string;
valueOf: () => string;
codePointAt: (pos: number) => number | undefined;
includes: (searchString: string, position?: number) => boolean;
endsWith: (searchString: string, endPosition?: number) => boolean;
normalize: {
(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
(form?: string): string;
};
repeat: (count: number) => string;
startsWith: (searchString: string, position?: number) => boolean;
anchor: (name: string) => string;
big: () => string;
blink: () => string;
bold: () => string;
fixed: () => string;
fontcolor: (color: string) => string;
fontsize: {
(size: number): string;
(size: string): string;
};
italics: () => string;
link: (url: string) => string;
small: () => string;
strike: () => string;
sub: () => string;
sup: () => string;
padStart: (maxLength: number, fillString?: string) => string;
padEnd: (maxLength: number, fillString?: string) => string;
trimEnd: () => string;
trimStart: () => string;
trimLeft: () => string;
trimRight: () => string;
matchAll: (regexp: RegExp) => RegExpStringIterator<RegExpExecArray>;
replaceAll: {
(searchValue: string | RegExp, replaceValue: string): string;
(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
};
at: (index: number) => string | undefined;
isWellFormed: () => boolean;
toWellFormed: () => string;
[Symbol.iterator]: () => StringIterator<string>;
kind: "$kind" | "ScriptCall" | "CallFunction";
};
}, {
sender: address;
sequenceNumber: string | number | bigint;
chainId: string | number | bigint;
maxGas: string | number | bigint;
action: {
code: string | Uint8Array;
args: Iterable<number> & {
length: number;
};
typeArgs: Iterable<string | import("../bcs/types.js").BcsTypeTag> & {
length: number;
};
kind: "ScriptCall";
} | {
functionId: {
moduleId: {
address: address;
name: string;
};
name: string;
};
typeArgs: Iterable<string | import("../bcs/types.js").BcsTypeTag> & {
length: number;
};
args: Iterable<Iterable<number> & {
length: number;
}> & {
length: number;
};
kind: "CallFunction";
};
}>;
encode(): import("@mysten/bcs").SerializedBcs<{
data: number[];
auth: number[];
}, {
data: Iterable<number> & {
length: number;
};
auth: Iterable<number> & {
length: number;
};
}>;
private getData;
private isValid;
}