@keetanetwork/keetanet-client
Preparing search index...
KeetaNetSDK
Referenced
Node
Class Node
Index
Constructors
C
constructor
Properties
P
base
Token
P
config
P
ledger
P
log
P
network
Address
P
stats
P
switch
P
timing
P
is
Instance
P
Kind
Methods
M
add
Heap
To
Ledger
M
add
To
Ledger
M
copy
M
gc
M
invoke
Heap
Blocks
M
recv
Message
From
Peer
M
run
M
send
Message
M
stop
M
sync
M
get
Default
Config
M
main
Constructors
constructor
new
Node
(
configOrNode
:
Node
|
NodeConfig
)
:
Node
Parameters
configOrNode
:
Node
|
NodeConfig
Returns
Node
Properties
Readonly
base
Token
baseToken
:
TokenAddress
config
config
:
NodeConfig
ledger
ledger
:
Ledger
log
log
:
{
debug
:
(
from
:
string
,
...
message
:
any
[]
)
=>
void
;
error
:
(
from
:
string
,
...
message
:
any
[]
)
=>
void
;
}
= ...
Readonly
network
Address
networkAddress
:
NetworkAddress
stats
stats
:
Stats
switch
switch
:
P2PSwitch
timing
timing
:
RequestTiming
Static
is
Instance
isInstance
:
(
obj
:
any
,
strict
?:
boolean
)
=>
obj
is
Node
= ...
Static
Kind
Kind
:
typeof
NodeKind
= NodeKind
Methods
add
Heap
To
Ledger
addHeapToLedger
(
blockPrevHashes
?:
BlockHash
[]
,
broadcast
?:
boolean
,
)
:
Promise
<
null
|
BlockHash
[]
>
Parameters
Optional
blockPrevHashes
:
BlockHash
[]
broadcast
:
boolean
= true
Returns
Promise
<
null
|
BlockHash
[]
>
add
To
Ledger
addToLedger
(
votesAndBlocks
:
VoteStaple
,
broadcast
?:
boolean
)
:
Promise
<
boolean
>
Parameters
votesAndBlocks
:
VoteStaple
broadcast
:
boolean
= true
Returns
Promise
<
boolean
>
copy
copy
()
:
Node
Returns
Node
gc
gc
(
timeout
?:
number
)
:
Promise
<
void
>
Parameters
timeout
:
number
= 280000
Returns
Promise
<
void
>
invoke
Heap
Blocks
invokeHeapBlocks
(
blockPrevHashes
:
BlockHash
[]
)
:
Promise
<
void
>
Parameters
blockPrevHashes
:
BlockHash
[]
Returns
Promise
<
void
>
recv
Message
From
Peer
recvMessageFromPeer
(
from
:
P2PConnection
,
id
:
string
,
type
:
string
,
data
:
any
,
ttl
?:
number
,
)
:
Promise
<
boolean
>
Parameters
from
:
P2PConnection
id
:
string
type
:
string
data
:
any
Optional
ttl
:
number
Returns
Promise
<
boolean
>
run
run
()
:
Promise
<
void
>
Returns
Promise
<
void
>
send
Message
sendMessage
(
id
:
string
,
type
:
string
,
data
:
any
,
ttl
?:
number
,
exclude
?:
(
string
|
P2PConnection
)
[]
,
)
:
Promise
<
boolean
>
Parameters
id
:
string
type
:
string
data
:
any
Optional
ttl
:
number
Optional
exclude
: (
string
|
P2PConnection
)
[]
Returns
Promise
<
boolean
>
stop
stop
()
:
Promise
<
void
>
Returns
Promise
<
void
>
sync
sync
()
:
Promise
<
void
>
Returns
Promise
<
void
>
Static
get
Default
Config
getDefaultConfig
(
network
:
"production"
|
"staging"
|
"beta"
|
"test"
|
"dev"
,
)
:
Omit
<
NodeConfig
,
"stats"
|
"ledger"
>
Parameters
network
:
"production"
|
"staging"
|
"beta"
|
"test"
|
"dev"
Returns
Omit
<
NodeConfig
,
"stats"
|
"ledger"
>
Static
main
main
(
config
:
NodeConfig
)
:
void
Parameters
config
:
NodeConfig
Returns
void
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
C
constructor
Properties
P
base
Token
P
config
P
ledger
P
log
P
network
Address
P
stats
P
switch
P
timing
P
is
Instance
P
Kind
Methods
M
add
Heap
To
Ledger
M
add
To
Ledger
M
copy
M
gc
M
invoke
Heap
Blocks
M
recv
Message
From
Peer
M
run
M
send
Message
M
stop
M
sync
M
get
Default
Config
M
main
@keetanetwork/keetanet-client
Loading...