@roochnetwork/rooch-sdk
Version:
285 lines (284 loc) • 12 kB
TypeScript
import { Args } from '../bcs/index.js';
import { address, Bytes, identifier, u8, u64 } from '../types/index.js';
import { CallFunctionArgs, CallScript } from './types.js';
export declare class CallFunction {
address: string;
module: identifier;
function: identifier;
args: Args[];
typeArgs: string[];
constructor(input: CallFunctionArgs);
functionId(): string;
encodeArgs(): string[];
encodeArgsWithUtf8(): string;
encodeArgsToByteArrays(): u8[][];
}
type MoveActionType = CallFunction | CallScript;
export declare class MoveAction {
scheme: number;
val: MoveActionType;
private constructor();
static newCallFunction(input: CallFunctionArgs): MoveAction;
static newCallScript(input: CallScript): MoveAction;
}
export declare class TransactionData {
sender?: address;
sequenceNumber?: u64;
chainId?: u64;
maxGas?: u64;
action: MoveAction;
constructor(action: MoveAction, maxGas?: bigint, sender?: string, sequenceNumber?: bigint, chainId?: bigint);
encode(): 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";
};
}>;
hash(): Bytes;
}
export {};