@radixdlt/atom-transaction-mapping
Version:
40 lines • 1.32 kB
TypeScript
import { AnyUpParticle, upParticle } from '@radixdlt/atom';
import { Result } from 'neverthrow';
import { ApplicationStateType } from './_types';
export declare const reduceFromInitialState: <S extends Readonly<{
stateType: ApplicationStateType;
}>>(input: Readonly<{
initialState: S;
reduce: (input: Readonly<{
state: S;
upParticle: AnyUpParticle;
}>) => Result<S, Error>;
upParticles: AnyUpParticle[];
}>) => Result<S, Error>;
export declare const makeParticleReducer: <S extends Readonly<{
stateType: ApplicationStateType;
}>, R extends Readonly<{
applicationStateType: ApplicationStateType;
initialState: S;
reduce: (input: Readonly<{
state: S;
upParticle: AnyUpParticle;
}>) => Result<S, Error>;
combine: (input: Readonly<{
current: S;
newState: S;
}>) => Result<S, Error>;
reduceFromInitialState: (upParticles: AnyUpParticle[]) => Result<S, Error>;
}>>(input: Readonly<{
applicationStateType: ApplicationStateType;
initialState: S;
reduce: (input: Readonly<{
state: S;
upParticle: AnyUpParticle;
}>) => Result<S, Error>;
combine: (input: Readonly<{
current: S;
newState: S;
}>) => Result<S, Error>;
}>) => R;
//# sourceMappingURL=particleReducer.d.ts.map