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