@@ -2,7 +2,7 @@ import DAPIClient from '@dashevo/dapi-client';
2
2
import { Identifier } from '@dashevo/wasm-dpp' ;
3
3
4
4
type NonceState = {
5
- value : BigInt ,
5
+ value : bigint ,
6
6
lastFetchedAt : number ,
7
7
} ;
8
8
@@ -23,7 +23,7 @@ class NonceManager {
23
23
this . identityContractNonce = new Map ( ) ;
24
24
}
25
25
26
- public setIdentityNonce ( identityId : Identifier , nonce : BigInt ) {
26
+ public setIdentityNonce ( identityId : Identifier , nonce : bigint ) {
27
27
const identityIdStr = identityId . toString ( ) ;
28
28
const nonceState = this . identityNonce . get ( identityIdStr ) ;
29
29
@@ -37,7 +37,7 @@ class NonceManager {
37
37
}
38
38
}
39
39
40
- public async getIdentityNonce ( identityId : Identifier ) : Promise < BigInt > {
40
+ public async getIdentityNonce ( identityId : Identifier ) : Promise < bigint > {
41
41
const identityIdStr = identityId . toString ( ) ;
42
42
let nonceState = this . identityNonce . get ( identityIdStr ) ;
43
43
@@ -71,13 +71,13 @@ class NonceManager {
71
71
return nonceState . value ;
72
72
}
73
73
74
- public async bumpIdentityNonce ( identityId : Identifier ) : Promise < BigInt > {
74
+ public async bumpIdentityNonce ( identityId : Identifier ) : Promise < bigint > {
75
75
const nextIdentityNonce = ( await this . getIdentityNonce ( identityId ) ) ;
76
76
this . setIdentityNonce ( identityId , nextIdentityNonce ) ;
77
77
return nextIdentityNonce ;
78
78
}
79
79
80
- public setIdentityContractNonce ( identityId : Identifier , contractId : Identifier , nonce : BigInt ) {
80
+ public setIdentityContractNonce ( identityId : Identifier , contractId : Identifier , nonce : bigint ) {
81
81
const identityIdStr = identityId . toString ( ) ;
82
82
const contractIdStr = contractId . toString ( ) ;
83
83
@@ -103,7 +103,7 @@ class NonceManager {
103
103
public async getIdentityContractNonce (
104
104
identityId : Identifier ,
105
105
contractId : Identifier ,
106
- ) : Promise < BigInt > {
106
+ ) : Promise < bigint > {
107
107
const identityIdStr = identityId . toString ( ) ;
108
108
const contractIdStr = contractId . toString ( ) ;
109
109
@@ -151,7 +151,7 @@ class NonceManager {
151
151
public async bumpIdentityContractNonce (
152
152
identityId : Identifier ,
153
153
contractId : Identifier ,
154
- ) : Promise < BigInt > {
154
+ ) : Promise < bigint > {
155
155
const identityContractNonce = await this . getIdentityContractNonce ( identityId , contractId ) ;
156
156
// @ts -ignore
157
157
const nextIdentityContractNonce = identityContractNonce + 1n ;
0 commit comments