@elfo/sdk / Exports / ElfoNode
Represents a elfo node account
• authority: string
• isRegistered: boolean
• nodePaymentAccount: string
• nodePaymentWallet: string
• publicKey: string
▸ Static
address(authority
): string
Helper function to generate node PDA Address
example
const provider: Provider = getProvider();
const nodeAddress: string = ElfoNode.address(provider.wallet.publicKey.toBase58());
Name | Type | Description |
---|---|---|
authority |
string |
Public Key of node authority in base58 format |
string
PDA of the node in base58 format
▸ Static
from(nodePublicKey
, provider
): Promise
<ElfoNode
>
Fetches a node instance from a public key
example
const provider: Provider = getProvider();
const nodeAddress: string = ElfoNode.address(provider.wallet.publicKey.toBase58());
const node: ElfoNode = ElfoNode.from(nodeAddress, provider);
Name | Type | Description |
---|---|---|
nodePublicKey |
string |
Public key of the node |
provider |
default |
Anchor connection provider |
Promise
<ElfoNode
>