mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
optional version mask
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { Expose, Transform } from 'class-transformer';
|
import { Expose, Transform } from 'class-transformer';
|
||||||
import { ArrayMaxSize, ArrayMinSize, IsArray, IsString } from 'class-validator';
|
import { ArrayMaxSize, ArrayMinSize, IsArray, IsOptional, IsString } from 'class-validator';
|
||||||
|
|
||||||
import { eRequestMethod } from '../enums/eRequestMethod';
|
import { eRequestMethod } from '../enums/eRequestMethod';
|
||||||
import { StratumBaseMessage } from './StratumBaseMessage';
|
import { StratumBaseMessage } from './StratumBaseMessage';
|
||||||
@@ -41,12 +41,15 @@ export class MiningSubmitMessage extends StratumBaseMessage {
|
|||||||
return obj.params[4];
|
return obj.params[4];
|
||||||
})
|
})
|
||||||
public nonce: string
|
public nonce: string
|
||||||
|
|
||||||
@Expose()
|
@Expose()
|
||||||
|
@IsOptional()
|
||||||
@IsString()
|
@IsString()
|
||||||
@Transform(({ value, key, obj, type }) => {
|
@Transform(({ value, key, obj, type }) => {
|
||||||
return obj.params[5];
|
return obj.params[5];
|
||||||
})
|
})
|
||||||
public versionMask: string;
|
public versionMask?: string | null;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this.method = eRequestMethod.AUTHORIZE;
|
this.method = eRequestMethod.AUTHORIZE;
|
||||||
|
|||||||
Reference in New Issue
Block a user