https://github.com/dialectlabs/dart-cardinal-twitter
https://github.com/dialectlabs/dart-cardinal-twitter
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/dialectlabs/dart-cardinal-twitter
- Owner: dialectlabs
- License: apache-2.0
- Created: 2022-06-20T17:30:31.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-21T00:02:16.000Z (almost 4 years ago)
- Last Synced: 2024-04-28T01:10:14.175Z (about 2 years ago)
- Language: Dart
- Size: 21.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://twitter.com/saydialect)
[](https://discord.gg/cxtZVyrJ)
## Dart library for Cardinal namespaces
This library is a partial dart implementation of Cardinal's namespace protocol, specifically enabling the use of Twitter handles as wallet identification in Flutter applications.
## Implementation
1. Return a given wallet's registered Twitter handle
```dart
final String twitterHandle = await tryGetName(
environment: SolanaEnvironment, // mainnet | devnet | localnet
namespacePublicKey: PublicKey, // Cardinal namespaces program's public key, value provided in this package as 'NAMESPACES_PROGRAM_ID'
publicKey: PublicKey // wallet's public key to query as a string
);
```
```
2. Return a given Twitter handle's registered wallet public key
```dart
final PublicKey publicKey = await getNameEntry(
environment: SolanaEnvironment, // mainnet | devnet | localnet
namespace: String, // Twitter namespaces id, value provided in this package as 'twitterNamespace'
twitterHandle: String // Twitter handle to query as a string
);
```
## Further Help & Documentation
We will continue to update documentation as often as possible. But if you need help, feel free to reach out in our [Dialect Discord server](https://discord.gg/wK6WX7974J).