UNPKG

raiden-ts

Version:

Raiden Light Client Typescript/Javascript SDK

39 lines (38 loc) 1.88 kB
import * as t from 'io-ts'; import type { Signed } from '../utils/types'; export declare type ChannelKey = `0x${string}@0x${string}`; export declare const ChannelKey: t.RefinementType<t.StringC, `0x${string}@0x${string}`, string, unknown>; export declare type ChannelUniqueKey = `${ChannelKey}#${number}`; export declare const ChannelUniqueKey: t.RefinementType<t.StringC, `0x${string}@0x${string}#${number}`, string, unknown>; export declare const Lock: t.IntersectionC<[t.TypeC<{ amount: import("../utils/types").UIntC<32>; expiration: import("../utils/types").UIntC<32>; secrethash: import("../utils/types").HexStringC<32>; }>, t.PartialC<{ registered: t.LiteralC<true>; }>]>; export interface Lock extends t.TypeOf<typeof Lock> { } /** * Balance Proof constructed from an EnvelopeMessage * Either produced by us or received from the partner, the BPs are generated from the messages * because BP signature requires the hash of the message, for authentication of data not included * nor relevant for the smartcontract/BP itself, but so for the peers (e.g. payment_id) */ declare const _BalanceProof: t.ReadonlyC<t.TypeC<{ chainId: import("../utils/types").UIntC<32>; tokenNetworkAddress: import("../utils/types").AddressC; channelId: import("../utils/types").UIntC<32>; nonce: import("../utils/types").UIntC<8>; transferredAmount: import("../utils/types").UIntC<32>; lockedAmount: import("../utils/types").UIntC<32>; locksroot: import("../utils/types").HexStringC<32>; additionalHash: import("../utils/types").HexStringC<32>; }>>; export interface BalanceProof extends t.TypeOf<typeof _BalanceProof> { } export interface BalanceProofC extends t.Type<BalanceProof, t.OutputOf<typeof _BalanceProof>> { } export declare const BalanceProof: BalanceProofC; export declare const BalanceProofZero: Signed<BalanceProof>; export {};