@argonprotocol/localchain 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +28 -2
- package/index.js +1 -0
- package/package.json +7 -7
package/index.d.ts
CHANGED
|
@@ -69,12 +69,13 @@ export class BalanceSync {
|
|
|
69
69
|
syncMainchainTransfers(): Promise<Array<NotarizationTracker>>
|
|
70
70
|
convertTaxToVotes(options: ChannelHoldCloseOptions): Promise<Array<NotarizationTracker>>
|
|
71
71
|
syncBalanceChange(balanceChange: BalanceChange): Promise<BalanceChange>
|
|
72
|
-
processPendingChannelHolds(): Promise<
|
|
72
|
+
processPendingChannelHolds(): Promise<ChannelHoldResult>
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
export class BalanceSyncResult {
|
|
76
76
|
get balanceChanges(): Array<BalanceChange>
|
|
77
|
-
get channelHoldNotarizations(): Array<
|
|
77
|
+
get channelHoldNotarizations(): Array<NotarizationTracker>
|
|
78
|
+
get channelHoldsUpdated(): Array<ChannelHold>
|
|
78
79
|
get mainchainTransfers(): Array<NotarizationTracker>
|
|
79
80
|
get jumpAccountConsolidations(): Array<NotarizationTracker>
|
|
80
81
|
get blockVotes(): Array<NotarizationTracker>
|
|
@@ -105,6 +106,11 @@ export class ChannelHold {
|
|
|
105
106
|
isPastClaimPeriod(currentTick: number): boolean
|
|
106
107
|
}
|
|
107
108
|
|
|
109
|
+
export class ChannelHoldResult {
|
|
110
|
+
get channelHoldNotarizations(): Array<NotarizationTracker>
|
|
111
|
+
get channelHoldsUpdated(): Array<ChannelHold>
|
|
112
|
+
}
|
|
113
|
+
|
|
108
114
|
export class DomainLease {
|
|
109
115
|
id: number
|
|
110
116
|
name: string
|
|
@@ -259,6 +265,7 @@ export class NotarizationTracker {
|
|
|
259
265
|
/** Returns the balance changes that were submitted to the notary indexed by the stringified account id (napi doesn't allow numbers as keys) */
|
|
260
266
|
get balanceChangesByAccountId(): Promise<Record<string, BalanceChange>>
|
|
261
267
|
waitForNotebook(): Promise<void>
|
|
268
|
+
get channelHolds(): Promise<Array<ChannelHold>>
|
|
262
269
|
/** Asks the notary for proof the transaction was included in a notebook header. If this notebook has not been finalized yet, it will return an error. */
|
|
263
270
|
getNotebookProof(): Promise<Array<NotebookProof>>
|
|
264
271
|
/** Confirms the root added to the mainchain */
|
|
@@ -408,6 +415,8 @@ export interface BlockVote {
|
|
|
408
415
|
index: number
|
|
409
416
|
/** The voting power of this vote, determined from the amount of tax */
|
|
410
417
|
power: bigint
|
|
418
|
+
/** The tick where a vote was intended */
|
|
419
|
+
tick: number
|
|
411
420
|
/** The domain used to create this vote */
|
|
412
421
|
domainHash: Array<number>
|
|
413
422
|
/** The domain payment address used to create this vote */
|
|
@@ -441,6 +450,23 @@ export const CHANNEL_HOLD_CLAWBACK_TICKS: number
|
|
|
441
450
|
/** Minimum milligons that can be settled in a channel_hold */
|
|
442
451
|
export const CHANNEL_HOLD_MINIMUM_SETTLEMENT: bigint
|
|
443
452
|
|
|
453
|
+
export interface ChannelHold {
|
|
454
|
+
id: string
|
|
455
|
+
fromAddress: string
|
|
456
|
+
toAddress: string
|
|
457
|
+
balanceChangeNumber: number
|
|
458
|
+
expirationTick: number
|
|
459
|
+
isClient: boolean
|
|
460
|
+
initialBalanceChangeJson: string
|
|
461
|
+
notaryId: number
|
|
462
|
+
holdAmount: bigint
|
|
463
|
+
delegatedSignerAddress?: string
|
|
464
|
+
domainHash?: Buffer
|
|
465
|
+
notarizationId?: number
|
|
466
|
+
missedClaimWindow: boolean
|
|
467
|
+
settledAmount: bigint
|
|
468
|
+
}
|
|
469
|
+
|
|
444
470
|
export interface ChannelHoldCloseOptions {
|
|
445
471
|
votesAddress?: string
|
|
446
472
|
/** What's the minimum amount of tax we should wait for before voting on blocks */
|
package/index.js
CHANGED
|
@@ -370,6 +370,7 @@ module.exports.BalanceSync = nativeBinding.BalanceSync
|
|
|
370
370
|
module.exports.BalanceSyncResult = nativeBinding.BalanceSyncResult
|
|
371
371
|
module.exports.BalanceTipResult = nativeBinding.BalanceTipResult
|
|
372
372
|
module.exports.ChannelHold = nativeBinding.ChannelHold
|
|
373
|
+
module.exports.ChannelHoldResult = nativeBinding.ChannelHoldResult
|
|
373
374
|
module.exports.DomainLease = nativeBinding.DomainLease
|
|
374
375
|
module.exports.DomainRow = nativeBinding.DomainRow
|
|
375
376
|
module.exports.DomainStore = nativeBinding.DomainStore
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argonprotocol/localchain",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "A nodejs binding to the Argon Localchain",
|
|
5
5
|
"bin": "cli.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@argonprotocol/mainchain": "0.0.
|
|
43
|
+
"@argonprotocol/mainchain": "0.0.11",
|
|
44
44
|
"@napi-rs/cli": "3.0.0-alpha.55",
|
|
45
45
|
"@types/http-proxy": "^1.17.14",
|
|
46
46
|
"@types/jest": "^29.5.11",
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
},
|
|
62
62
|
"packageManager": "yarn@4.1.0",
|
|
63
63
|
"optionalDependencies": {
|
|
64
|
-
"@argonprotocol/localchain-darwin-x64": "0.0.
|
|
65
|
-
"@argonprotocol/localchain-darwin-arm64": "0.0.
|
|
66
|
-
"@argonprotocol/localchain-win32-x64-msvc": "0.0.
|
|
67
|
-
"@argonprotocol/localchain-linux-x64-gnu": "0.0.
|
|
68
|
-
"@argonprotocol/localchain-linux-arm64-gnu": "0.0.
|
|
64
|
+
"@argonprotocol/localchain-darwin-x64": "0.0.11",
|
|
65
|
+
"@argonprotocol/localchain-darwin-arm64": "0.0.11",
|
|
66
|
+
"@argonprotocol/localchain-win32-x64-msvc": "0.0.11",
|
|
67
|
+
"@argonprotocol/localchain-linux-x64-gnu": "0.0.11",
|
|
68
|
+
"@argonprotocol/localchain-linux-arm64-gnu": "0.0.11"
|
|
69
69
|
}
|
|
70
70
|
}
|