@ledgerhq/coin-tezos
Version:
44 lines • 1.98 kB
TypeScript
import type { TezosContext } from '../config';
import type { MichelsonV1Expression } from '@taquito/rpc';
/**
* Partial Tezos operation contents: RPC operation contents without `source`,
* `counter` or `branch`, and with optional `fee`/`gas_limit`/`storage_limit`. This
* module fills the missing fields (`source`, a sequential `counter`, and — when
* absent — `fee`/`gas`/`storage` via estimation). Supports `transaction` (transfers
* and contract calls) and `delegation`; other kinds raise UnsupportedOperationKind.
*/
export type PartialTezosTransactionOperation = {
kind: 'transaction';
destination: string;
amount: string;
parameters?: {
entrypoint: string;
value: MichelsonV1Expression;
};
fee?: string;
gas_limit?: string;
storage_limit?: string;
};
export type PartialTezosDelegationOperation = {
kind: 'delegation';
delegate?: string;
fee?: string;
gas_limit?: string;
storage_limit?: string;
};
export type PartialTezosOperation = PartialTezosTransactionOperation | PartialTezosDelegationOperation;
/**
* Craft a forged (but unsigned) Tezos operation from a JSON-serialized array of
* partial operation contents ({@link PartialTezosOperation}).
*
* Fills the fields a caller cannot specify up front: `source`, a sequential `counter`
* starting at `sequence`, and any missing `fee`/`gas_limit`/`storage_limit` (estimated
* against the node). Prepends a REVEAL when the sender's manager key is not yet
* revealed on-chain.
*
* Returns the `0x03`-watermarked forged hex produced by {@link rawEncode} — the same
* format the structured `craft()` path returns and broadcasts, so the existing
* `signer.signTransaction` + `combine` + broadcast path applies to it unchanged.
*/
export declare function craftRawOperations(context: TezosContext, rawTransaction: string, sender: string, publicKey: string, sequence: bigint): Promise<string>;
//# sourceMappingURL=craftRawOperations.d.ts.map