.get.node¶
.isNameAvailable¶
pruf.get.node.isNameAvailable(name)
Checks to see if a proposed node name is available.
Parameters¶
name
String
Name to check for availability
Returns¶
Bool
Example usage¶
1//Example pruf-js code 2 3let _name = "NEW_NODE" 4 5pruf.get.node.isNameAvailable(_name) 6.then(console.log)
.priceData¶
pruf.get.node.priceData()
Get current node price information.
Parameters¶
none
Returns¶
Object | priceData
Example usage¶
1//Example pruf-js code 2 3pruf.get.node.priceData() 4.then(console.log)
.switchAt¶
pruf.get.node.switchAt(nodeId, position)
Gets a switch state of a specified node at given index.
Parameters¶
nodeId
String | Uint32
ID used to reference a node
position
String | Uint
Position in switchboard string to check
Returns¶
0/1 | state
Example usage¶
1//Example pruf-js code 2 3let _nodeId = "10" 4let _position = "1" 5 6pruf.get.node.switchAt( 7 _nodeId, 8 _position 9 ) 10.then(console.log)
.extendedData¶
pruf.get.node.extendedData(nodeId)
Gets the extended CAS data attatched to a node.
Parameters¶
nodeId
String | Uint32
ID used to reference a node
Returns¶
Object | extendedData
Example usage¶
1//Example pruf-js code 2 3let _nodeId = "10" 4 5pruf.get.node.extendedData( 6 _nodeId, 7 ) 8.then(console.log)
.importStatus¶
pruf.get.node.importStatus(nodeId, otherNodeId)
Gets the one-way import agreement status between two nodes.
Parameters¶
nodeId
String | Uint32
ID used to reference the exporting node
otherNodeId
String | Uint32
ID used to reference the importing node
Returns¶
Uint | state
Example usage¶
1//Example pruf-js code 2 3let _nodeId = "10" 4let _otherNodeId = "11" 5 6pruf.get.node.importStatus(_nodeId, _otherNodeId) 7.then(console.log)
.localNode¶
pruf.get.node.localNode(foreignNodeId)
Gets the approved local node ID for a specified foreign node, if one exists.
Parameters¶
foreignNodeId
String | Uint32
Id of foreign node to check
Returns¶
Uint | localNodeId
Example usage¶
1//Example pruf-js code 2 3let _foreignNodeId = "11" 4 5pruf.get.node.PLACEHOLDER(_foreignNodeId) 6.then(console.log)
.record¶
pruf.get.node.record(nodeId)
Gets the record of specified node.
Parameters¶
nodeId
String | Uint32
ID used to reference a node
Returns¶
Object | record
Example usage¶
1//Example pruf-js code 2 3let _nodeId = "10" 4 5pruf.get.node.PLACEHOLDER(_nodeId) 6.then(console.log)
.name¶
pruf.get.node.name(nodeId)
Gets the name associated with the specified node ID.
Parameters¶
nodeId
String | Uint32
ID used to reference a node
Returns¶
String | name
Example usage¶
1//Example pruf-js code 2 3let _nodeId = "10" 4 5pruf.get.node.name(_nodeId) 6.then(console.log)
.discount¶
pruf.get.node.discount(nodeId)
Gets the current payment ratio for a node.
Parameters¶
nodeId
String | Uint32
ID used to reference a node
Returns¶
Uint | discount
Example usage¶
1//Example pruf-js code 2 3let _nodeId = "10" 4 5pruf.get.node.discount(_nodeId) 6.then(console.log)
.numberOfUsers¶
pruf.get.node.numberOfUsers(nodeId)
gets the number of user authorized on specified node.
Parameters¶
nodeId
String | Uint32
ID used to reference a node
Returns¶
Uint | numberOfUsers
Example usage¶
1//Example pruf-js code 2 3let _nodeId = "10" 4 5pruf.get.node.numberOfUsers(_nodeId) 6.then(console.log)
.invoiceForOperation¶
pruf.get.node.invoiceForOperation(nodeId, operationIndex)
Gets the current invoice for an operation at on specified node at given index.
Parameters¶
nodeId
String | Uint32
ID used to reference a node
operationIndex
String | Uint16
Index number of operation cost to check
Returns¶
Object | invoice
Example usage¶
1//Example pruf-js code 2 3let _nodeId = "10" 4let _operationIndex = "3" 5 6pruf.get.node.invoiceForOperation( 7 _nodeId, 8 _operationIndex 9 ) 10.then(console.log)
.userType¶
pruf.get.node.userType(address, nodeId)
Gets the user type of specified address on a node.
Parameters¶
address
String | Addres
Address to check user type of
nodeId
String | Uint32
ID used to reference a node
Returns¶
Uint | userType
Example usage¶
1//Example pruf-js code 2let _address = "0xBef3b0b67061CACD4E10968d8Ba23A1c864c8049" 3let _nodeId = "10" 4 5pruf.get.node.userType( 6 _address, 7 _nodeId 8 ) 9.then(console.log)
.id¶
pruf.get.node.id(name)
Gets the ID of a node from the name, if it exists.
Parameters¶
name
String
Name from which to derive the ID
Returns¶
Uint | id
Example usage¶
1//Example pruf-js code 2 3let _name = "NEW_NODE" 4 5pruf.get.node.PLACEHOLDER(_name) 6.then(console.log)
.isSameRoot¶
pruf.get.node.isSameRoot(nodeId1, nodeId2)
Determines whether two nodes share a root.
Parameters¶
nodeId (1/2)
String | Uint32
IDs used to reference the nodes to be compared.
Returns¶
bool
Example usage¶
1//Example pruf-js code 2 3let _nodeId1 = "10" 4let _nodeId2 = "11" 5 6pruf.get.node.PLACEHOLDER( 7 _nodeId1, 8 _nodeId2 9) 10.then(console.log)
.balanceOf¶
pruf.get.node.balanceOf(address)
Gets the node balance of specified address.
Parameters¶
address
String | Address
Address to check for balance
Returns¶
Uint | balance
Example usage¶
1//Example pruf-js code 2 3let _address = "0xBef3b0b67061CACD4E10968d8Ba23A1c864c8049" 4 5pruf.get.node.PLACEHOLDER(_address) 6.then(console.log)
.tokenExists¶
pruf.get.node.tokenExists(nodeId)
Determines whether a specified node token ID exists.
Parameters¶
nodeId
String | Uint32
ID used to reference a node
Returns¶
Bool
Example usage¶
1//Example pruf-js code 2 3let _nodeId = "10" 4 5pruf.get.node.tokenExists(_nodeId) 6.then(console.log)
.heldNodeAtIndex¶
pruf.get.node.heldNodeAtIndex(address, index)
Gets the nodeId of node token in address, specified by index.
Parameters¶
address
String | Address
Address to check
index * String | Uint32 * Index of token in address
Returns¶
nodeId
Example usage¶
1//Example pruf-js code 2 3let _address = "0xBef3b0b67061CACD4E10968d8Ba23A1c864c8049" 4let _index = "2" 5 6pruf.get.node.heldNodeAtIndex( 7 _address, 8 _index 9) 10.then(console.log)
.nodeAtIndex¶
pruf.get.node.nodeAtIndex(index)
Gets the nodeId at index in the token contract.
Parameters¶
index
String | Uint32
Index of node token in contract
Returns¶
Uint32 | nodeId
Example usage¶
1//Example pruf-js code 2 3let _index = "2" 4 5pruf.get.node.nodeAtIndex(_index) 6.then(console.log)
.totalSupply¶
pruf.get.node.totalSupply()
Gets the current total supply of nodes.
Parameters¶
None
Returns¶
Uint | totalSupply
Example usage¶
1//Example pruf-js code 2 3pruf.get.node.PLACEHOLDER() 4.then(console.log)
.ownerOf¶
pruf.get.node.ownerOf(nodeId)
Gets the owner of a specified node.
Parameters¶
nodeId
String | Uint32
ID used to reference a node
Returns¶
Address | owner
Example usage¶
1//Example pruf-js code 2 3let _nodeId = "10" 4 5pruf.get.node.ownerOf(_nodeId) 6.then(console.log)
.URI¶
pruf.get.node.URI(nodeId)
Gets the URI of specified node.
Parameters¶
nodeId
String | Uint32
ID used to reference a node
Returns¶
String | URI
Example usage¶
1//Example pruf-js code 2 3let _nodeId = "10" 4 5pruf.get.node.URI(_nodeId) 6.then(console.log)
.approvedOperator¶
pruf.get.node.approvedOperator(nodeId)
Gets the approved operator of specified node.
Parameters¶
nodeId
String | Uint32
ID used to reference a node
Returns¶
Address | approvedOperator
Example usage¶
1//Example pruf-js code 2 3let _nodeId = "10" 4 5pruf.get.node.approvedOperator(_nodeId) 6.then(console.log)
.isApprovedForAll¶
pruf.get.node.isApprovedForAll(owner, operator)
PLACEHOLDER.
Parameters¶
owner
String | Address
Owner of node(s)
operator
String | Address
Address to check for operator status
Returns¶
Bool
Example usage¶
1//Example pruf-js code 2 3let _owner = "0xBef3b0b67061CACD4E10968d8Ba23A1c864c8049" 4let _operator = "0x9094CaDBF4d35ce5FeD92eb758909fB38F7fecb1" 5 6pruf.get.node.PLACEHOLDER( 7 _owner, 8 _operator 9) 10.then(console.log)