UNPKG

@kubectl/caminojs

Version:
73 lines 2.96 kB
/** * @packageDocumentation * @module API-PlatformVM-ImportTx */ import { Buffer } from "buffer/"; import { TransferableOutput } from "./outputs"; import { TransferableInput } from "./inputs"; import { KeyChain } from "./keychain"; import { Credential } from "../../common/credentials"; import { BaseTx } from "./basetx"; import { SerializedEncoding } from "../../utils/serialization"; /** * Class representing an unsigned Import transaction. */ export declare class ImportTx extends BaseTx { protected _typeName: string; protected _typeID: number; serialize(encoding?: SerializedEncoding): object; deserialize(fields: object, encoding?: SerializedEncoding): void; protected sourceChain: Buffer; protected numIns: Buffer; protected importIns: TransferableInput[]; /** * Returns the id of the [[ImportTx]] */ getTxType(): number; /** * Takes a {@link https://github.com/feross/buffer|Buffer} containing an [[ImportTx]], parses it, populates the class, and returns the length of the [[ImportTx]] in bytes. * * @param bytes A {@link https://github.com/feross/buffer|Buffer} containing a raw [[ImportTx]] * * @returns The length of the raw [[ImportTx]] * * @remarks assume not-checksummed */ fromBuffer(bytes: Buffer, offset?: number): number; /** * Returns a {@link https://github.com/feross/buffer|Buffer} representation of the [[ImportTx]]. */ toBuffer(): Buffer; /** * Returns an array of [[TransferableInput]]s in this transaction. */ getImportInputs(): TransferableInput[]; /** * Returns a {@link https://github.com/feross/buffer|Buffer} for the source chainid. */ getSourceChain(): Buffer; /** * Takes the bytes of an [[UnsignedTx]] and returns an array of [[Credential]]s * * @param msg A Buffer for the [[UnsignedTx]] * @param kc An [[KeyChain]] used in signing * * @returns An array of [[Credential]]s */ sign(msg: Buffer, kc: KeyChain): Credential[]; clone(): this; create(...args: any[]): this; /** * Class representing an unsigned Import transaction. * * @param networkID Optional networkID, [[DefaultNetworkID]] * @param blockchainID Optional blockchainID, default Buffer.alloc(32, 16) * @param outs Optional array of the [[TransferableOutput]]s * @param ins Optional array of the [[TransferableInput]]s * @param memo Optional {@link https://github.com/feross/buffer|Buffer} for the memo field * @param sourceChain Optiona chainid for the source inputs to import. Default platform chainid. * @param importIns Array of [[TransferableInput]]s used in the transaction */ constructor(networkID?: number, blockchainID?: Buffer, outs?: TransferableOutput[], ins?: TransferableInput[], memo?: Buffer, sourceChain?: Buffer, importIns?: TransferableInput[]); } //# sourceMappingURL=importtx.d.ts.map