An Unofficial Client Library Ipify on Dart

Dart Ipify .An unofficial client library for Ipify <https://www.ipify.org/> A Simple Public IP Address API, Likewise a geographical IP address details API.

About ipify

Using ipify is ridiculously simple. You can get your public IP directly or you can get the precise physical location of a given IP address. so if you only have as much as an IP address, you can still find out its geographical details.

Meta

  • Author: Khalil Mejdi
  • Email: khalil.mejdi
  • Status: maintained, active

Purpose

This library makes getting your public IP address or the precise geographical details of a given IP address with the dart language extremely simple using Ipify's API.

Installation

dependencies:
  dart_ipify: ^1.1.1

Usage

Using this library is very simple. Here's a simple example:

IP Address API

import 'package:dart_ipify/dart_ipify.dart';

void main() async {
  final ipv4 = await Ipify.ipv4();
  print(ipv4); // 98.207.254.136

  final ipv6 = await Ipify.ipv64();
  print(ipv6); // 98.207.254.136 or 2a00:1450:400f:80d::200e

  final ipv4json = await Ipify.ipv64(format: Format.JSON);
  print(ipv4json); //{"ip":"98.207.254.136"} or {"ip":"2a00:1450:400f:80d::200e"}

  // The response type can be text, json or jsonp
}

IP Geolocation API

import 'package:dart_ipify/dart_ipify.dart';

void main() async {
  final mygeo = await Ipify.geo('at_apiKeyxxxxxxxxxxxxxxxxxxxxxxx');
  print(mygeo.location);

  final somegeo = await Ipify.geo('at_apiKeyxxxxxxxxxxxxxxxxxxxxxxx', ip: '8.8.8.8');
  print(somegeo);

  final balance = await Ipify.balance('at_apiKeyxxxxxxxxxxxxxxxxxxxxxxx');
  print(balance);
}

Change Log

All library changes, in descending order.

1.1.1

1.1.0

  • Migrating to null-safety.

1.0.2

  • Adding GeoLocation API.
  • Adding example.

1.0.1

  • Supporting multiple platforms.
  • Documenting code.
  • Adding example.

1.0.0

  • First release.

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add dart_ipify

With Flutter:

 $ flutter pub add dart_ipify

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):


dependencies:
  dart_ipify: ^1.1.1

Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:dart_ipify/dart_ipify.dart';

example/dart_ipify_example.dart

import 'package:dart_ipify/dart_ipify.dart';
import 'package:dotenv/dotenv.dart' show load, env;

// Example
void main() async {
  load();
  var ipifyApiKeyName = 'IPIFY_API_KEY';
  var IPIFY_API_KEY =
      env.containsKey(ipifyApiKeyName) ? env[ipifyApiKeyName] : '';

  final ip = await Ipify.ipv64(format: Format.JSON);
  print(ip);

  final myGeo = await Ipify.geo(IPIFY_API_KEY.toString());
  print(myGeo.location);

  final someGeo = await Ipify.geo(IPIFY_API_KEY.toString(), ip: '8.8.8.8');
  print(someGeo);

  final balance = await Ipify.balance(IPIFY_API_KEY.toString());
  print(balance);
}

Download Details:

Author: Bujupah

Source Code: https://github.com/Bujupah/dart_ipify

#dart #ipify 

What is GEEK

Buddha Community

An Unofficial Client Library Ipify on Dart

An Unofficial Client Library Ipify on Dart

Dart Ipify .An unofficial client library for Ipify <https://www.ipify.org/> A Simple Public IP Address API, Likewise a geographical IP address details API.

About ipify

Using ipify is ridiculously simple. You can get your public IP directly or you can get the precise physical location of a given IP address. so if you only have as much as an IP address, you can still find out its geographical details.

Meta

  • Author: Khalil Mejdi
  • Email: khalil.mejdi
  • Status: maintained, active

Purpose

This library makes getting your public IP address or the precise geographical details of a given IP address with the dart language extremely simple using Ipify's API.

Installation

dependencies:
  dart_ipify: ^1.1.1

Usage

Using this library is very simple. Here's a simple example:

IP Address API

import 'package:dart_ipify/dart_ipify.dart';

void main() async {
  final ipv4 = await Ipify.ipv4();
  print(ipv4); // 98.207.254.136

  final ipv6 = await Ipify.ipv64();
  print(ipv6); // 98.207.254.136 or 2a00:1450:400f:80d::200e

  final ipv4json = await Ipify.ipv64(format: Format.JSON);
  print(ipv4json); //{"ip":"98.207.254.136"} or {"ip":"2a00:1450:400f:80d::200e"}

  // The response type can be text, json or jsonp
}

IP Geolocation API

import 'package:dart_ipify/dart_ipify.dart';

void main() async {
  final mygeo = await Ipify.geo('at_apiKeyxxxxxxxxxxxxxxxxxxxxxxx');
  print(mygeo.location);

  final somegeo = await Ipify.geo('at_apiKeyxxxxxxxxxxxxxxxxxxxxxxx', ip: '8.8.8.8');
  print(somegeo);

  final balance = await Ipify.balance('at_apiKeyxxxxxxxxxxxxxxxxxxxxxxx');
  print(balance);
}

Change Log

All library changes, in descending order.

1.1.1

1.1.0

  • Migrating to null-safety.

1.0.2

  • Adding GeoLocation API.
  • Adding example.

1.0.1

  • Supporting multiple platforms.
  • Documenting code.
  • Adding example.

1.0.0

  • First release.

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add dart_ipify

With Flutter:

 $ flutter pub add dart_ipify

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):


dependencies:
  dart_ipify: ^1.1.1

Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:dart_ipify/dart_ipify.dart';

example/dart_ipify_example.dart

import 'package:dart_ipify/dart_ipify.dart';
import 'package:dotenv/dotenv.dart' show load, env;

// Example
void main() async {
  load();
  var ipifyApiKeyName = 'IPIFY_API_KEY';
  var IPIFY_API_KEY =
      env.containsKey(ipifyApiKeyName) ? env[ipifyApiKeyName] : '';

  final ip = await Ipify.ipv64(format: Format.JSON);
  print(ip);

  final myGeo = await Ipify.geo(IPIFY_API_KEY.toString());
  print(myGeo.location);

  final someGeo = await Ipify.geo(IPIFY_API_KEY.toString(), ip: '8.8.8.8');
  print(someGeo);

  final balance = await Ipify.balance(IPIFY_API_KEY.toString());
  print(balance);
}

Download Details:

Author: Bujupah

Source Code: https://github.com/Bujupah/dart_ipify

#dart #ipify 

Nyxx Extensions Module. Discord library for Dart

nyxx_extensions

Simple, robust framework for creating discord bots for Dart language.

 

Features

  • Slash commands support 
    Supports and provides easy API for creating and handling slash commands
  • Commands framework included 
    A fast way to create a bot with command support. Implementing the framework is simple - and everything is done automatically.
  • Cross Platform 
    Nyxx works on the command line, in the browser, and on mobile devices.
  • Fine Control 
    Nyxx allows you to control every outgoing HTTP request or WebSocket message.
  • Complete 
    Nyxx supports nearly all Discord API endpoints.

Quick example

Basic usage:

void main() {
  final bot = Nyxx("TOKEN", GatewayIntents.allUnprivileged);

  bot.onMessageReceived.listen((event) {
    if (event.message.content == "!ping") {
      event.message.channel.getFromCache()?.sendMessage(content: "Pong!");
    }
  });
}

Slash commands:

void main() {
  final bot = Nyxx("<%TOKEN%>", GatewayIntents.allUnprivileged);
  Interactions(bot)
    ..registerSlashCommand(
        SlashCommandBuilder("hi", "This is example slash command", [])
            ..registerHandler((event) async {
              await event.acknowledge();
              
              await event.respond(MessageBuilder.content("Hello World!"));
            })
    );
}

Commands:

void main() {
  final bot = Nyxx("TOKEN", GatewayIntents.allUnprivileged);

  Commander(bot, prefix: "!!!")
    ..registerCommand("ping", (context, message) => context.reply(content: "Pong!"));
}

More examples

Nyxx examples can be found here.

Commander examples can be found here

Slash commands (interactions) examples can be found here

Example bots

Documentation, help and examples

Dartdoc documentation is hosted on pub. This wiki just fills gap in docs with more descriptive guides and tutorials.

Discord API docs

Discord API documentation features rich descriptions about all topics that nyxx covers.

Discord API Guild

The unofficial guild for Discord Bot developers. To get help with nyxx check #dart_nyxx channel.

Dartdocs

The dartdocs page will always have the documentation for the latest release.

Dev docs

You can read about upcoming changes in the library on my website.

Wiki

Wiki documentation are designed to match the latest Nyxx release.

Contributing to Nyxx

Read contributing document

Credits

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add nyxx_extensions

With Flutter:

 $ flutter pub add nyxx_extensions

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  nyxx_extensions: ^2.0.0

Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:nyxx_extensions/attachment_extension.dart';
import 'package:nyxx_extensions/embedbuilder_extension.dart';
import 'package:nyxx_extensions/emoji.dart';
import 'package:nyxx_extensions/member_extension.dart';
import 'package:nyxx_extensions/message_resolver.dart';
import 'package:nyxx_extensions/utils.dart'; 

example/example.dart

import "package:nyxx/nyxx.dart";
import "package:nyxx_extensions/emoji.dart" as emoji_extension;
import "package:nyxx_extensions/src/message_resolver/message_resolver.dart" as message_resolver_extension;

// nyxx.extensions contains several different extensions
// that could simplify making and implementing bots.
void main() async {
  // Emoji extension would allow to download and fetch discord emoji definitions
  // from resource shared by Emzi.
  // Emoji utils can cache results to do not download json document each time
  final allEmojis = emoji_extension.getAllEmojiDefinitions();

  // Its also possible to filter the emojis based on predicate
  final filteredEmojis = emoji_extension.filterEmojiDefinitions(
          (emojiDefinition) => emojiDefinition.primaryName.startsWith("smile")
  );

  // Needed for next extension
  final bot = Nyxx("token", GatewayIntents.allUnprivileged);

  // Message Resolver extension allows to transform raw string message content
  // to format that user is seeing
  final messageResolver = message_resolver_extension.MessageResolver(bot);

  // resolve method will return message according to set handling settings in
  // MessageResolver constructor.
  final resolvedMessage = messageResolver.resolve("This is raw content. <!@123>");
} 

Download Details:

Author: nyxx-discord

Source Code: https://github.com/nyxx-discord/nyxx

#dart #discord 

What is dART Insurance (dART) | What is dART Insurance token | What is dART token

In this article, we’ll discuss information about the dART Insurance project and dART token

About dART

dART is the first NFT insurance platform on the market, preparing to launch on Binance Smart Chain’s intuitive and highly active network. With NFTs generating hundreds of millions of dollars of monthly trading volume, we provide a way for users to protect their valuable digital assets, which can regularly surpass seven or eight-figure sums.

By innovating on the traditional insurance model and introducing bonus features through the use of blockchain technology, dART will be able to reward platform stakeholders while providing safe, verifiable, and straightforward insurance coverage to this rapidly expanding digital marketplace.

dART users will secure insurance for their assets directly from the dART terminal, and our solution will be integrated into the NFT marketplaces.

The ability to insure NFT assets will become easily accessible to all crypto users. As the value being held in NFTs continues to grow, the ability to protect against risks becomes essential. dART will be the first platform allowing its users to insure their NFT assets.

NFTs are rapidly expanding, growing from a relatively obscure market to generating hundreds of millions of dollars in monthly trading volume. With the NFT market’s continuous growth, already valued at approximately $250 million at the end of 2020, dART is introducing the first platform built to protect against exploitation and hacks of NFTs through the utilisation of a decentralised insurance protocol.

The NFT market has begun to cement itself as a major player within the cryptocurrency space, but not a single NFT platform has incorporated a risk coverage solution for its users. We will be the first platform to address this, providing everyone a safe and secure ownership experience.

Using Insurance to Protect Your NFTs

If you’re reading this, you’ve probably heard of Beeple’s $69 million NFT sale through Christie’s Auction House, CryptoPunks worth millions of dollars each, and the countless other art pieces and digital collectibles that are worth five, six, or seven-figure sums. Considering these rare and highly sought-after pieces command incredibly high prices, it doesn’t make sense to leave them unprotected and uninsured.

Regardless of the sector, whether it be art, real estate, sports cards, or something more niche, any intelligent investor should take out an insurance policy to limit their downside risk. This rings especially true for decentralized markets, as there is a lot less accountability available if a problem arises and there is no centralized party to help resolve it. This is where dART comes in, offering NFT owners peace of mind through our user-centric platform.

Why Do NFTs Need Protection?

NFT protection should be at the forefront of any investor, speculator, or collector’s mind. There is a famous idiom in the blockchain community, “not your keys, not your coins”, with this also remaining true for any tokenized digital asset.

Even NFT platforms that offer their users the ability to store NFTs on a non-native wallet like Metamask present major risks, as hot wallets connected to the internet always have potential vulnerabilities. In the event that the NFT storage platform is compromised, if you accidentally download a virus, or if you experience an exploitation resulting in the loss of your asset, you need risk coverage. dART provides straightforward options with the sole goal of financially empowering NFT owners, picking up the slack that NFT platforms are unwilling or unable to offer their user bases.

All-in-all, if you have any form of significant wealth tied up in NFTs, whether that be hundred, thousands, or millions of dollars, asset insurance is the only way to truly protect yourself in this decentralised economy. Many have made life-changing money through their NFT collections and investments; they are at risk of losing everything they’ve worked for with zero repercussions if they do not take the proper safety precautions. As NFTs continue to establish themselves as a true value-generating asset and store of wealth on par with traditional physical art and collectibles, dART provides the key to make sure they are safe, with their value always accessible to the owner regardless of circumstances.

dART Token

As non-fungible tokens (NFTs) continue to establish themselves within the mainstream and climb in value, users need to be more proactive in protecting their digital assets. This is especially true within a decentralised economy with little accountability; if something goes wrong in the current marketplace, there is not much that anyone can do to provide protection. With this problem in mind, we developed dART, the first platform that allows users to protect the monetary value of their NFTs perpetually.

To act as an incentivization and governance mechanism for our decentralised network, we have created the dART token, the native cryptocurrency for our NFT risk coverage platform. dART will act as the ‘gas’ that facilitates transactions on our network, allow users to vote on the future direction of the platform, and earn through staking. Combining this with the token’s pre-programmed and limited scarcity, dART could have a tremendous impact on the NFT industry.

Governance

Third-party insurance companies compose themselves to generate as much profit as possible, even if it’s at the expense of their users; at dART, we are taking a different approach. With a focus on creating a highly functional decentralised and distributed risk coverage network, we are collectively determining the future direction of the platform through our community, relying on democratic principles to guide us forward. All dART holders will have a say in direct proportion to their ownership stake in the network, allowing for a fair and equally representative decision-making process.

Staking and Earning Fees

Beyond governance, dART introduces passive income opportunities directly to token holders. Any user will be able to easily stake dART in liquidity pools, generating a high and reliable APY, as well as stake the LP tokens generated into our governance staking protocol. Through these implementations, we are enabling easy-to-access reward pools where anyone can earn staking and LP rewards in proportion to their share of the staking pool.

The staking of dART in liquidity pools allows us to provide discretionary risk coverage to NFT holders, forming a buffer against losses due to hacks or manipulations. While the tokens acting as insurance collateral are sitting idly in the pool, they will be distributed amongst dART defi partners, who will use the liquidity to generate yield for dART owners. This model mirrors how the traditional insurance ecosystem works, but instead of the profits lining the pockets of wealthy executives and shareholders, they are returned back to the users of the platform, rewarding them alongside the platform’s growth and success.

How and Where to Buy dART Insurance (dART)?

dART is now live on the Ethereum mainnet and Binance mainnet The token address for dART is 0x5a4623F305A8d7904ED68638AF3B4328678edDBF. Be cautious not to purchase any other token with a smart contract different from this one (as this can be easily faked). We strongly advise to be vigilant and stay safe throughout the launch. Don’t let the excitement get the best of you.

Just be sure you have enough ETH and BNB in your wallet to cover the transaction fees.

You will have to first buy one of the major cryptocurrencies, usually either Bitcoin (BTC), Ethereum (ETH), Tether (USDT), Binance (BNB)…

We will use Binance Exchange here as it is one of the largest crypto exchanges that accept fiat deposits.

Once you finished the KYC process. You will be asked to add a payment method. Here you can either choose to provide a credit/debit card or use a bank transfer, and buy one of the major cryptocurrencies, usually either Bitcoin (BTC), Ethereum (ETH), Tether (USDT), Binance (BNB)…

SIGN UP ON BINANCE

Step by Step Guide : What is Binance | How to Create an account on Binance (Updated 2021)

Next step

You need a wallet address to Connect to Uniswap Decentralized Exchange, we use Metamask wallet

If you don’t have a Metamask wallet, read this article and follow the steps

What is Metamask wallet | How to Create a wallet and Use

Next step

Connect Metamask wallet to Uniswap Decentralized Exchange and Buy dART token

Contract: 0x5a4623F305A8d7904ED68638AF3B4328678edDBF

Read more: What is Uniswap | Beginner’s Guide on How to Use Uniswap

There are a few popular crypto exchanges where they have decent daily trading volumes and a huge user base. This will ensure you will be able to sell your coins at any time and the fees will usually be lower. It is suggested that you also register on these exchanges since once dART gets listed there it will attract a large amount of trading volumes from the users there, that means you will be having some great trading opportunities!

Top exchanges for token-coin trading. Follow instructions and make unlimited money

https://www.binance.com
 ☞ https://www.bittrex.com
 ☞ https://www.poloniex.com
 ☞ https://www.bitfinex.com
 ☞ https://www.huobi.com

Find more information dART

WebsiteExplorerExplorer 2Social ChannelSocial Channel 2DocumentationCoinmarketcap

🔺DISCLAIMER: The Information in the post isn’t financial advice, is intended FOR GENERAL INFORMATION PURPOSES ONLY. Trading Cryptocurrency is VERY risky. Make sure you understand these risks and that you are responsible for what you do with your money.

🔥 If you’re a beginner. I believe the article below will be useful to you

⭐ ⭐ ⭐ What You Should Know Before Investing in Cryptocurrency - For Beginner ⭐ ⭐ ⭐

Thank for visiting and reading this article! Please don’t forget to leave a like, comment and share!

#blockchain #bitcoi #dart #dart insurance

Quinten  Boehm

Quinten Boehm

1626979920

2021 Dart Programming Language Tutorial for Beginners #6 Classes

Welcome to my 2021 Dart programming language tutorial to beginners #6. In this series you will
be introduced to classes, constructor, getter, setter, inheritance, singleton and learn how to use them in Dart.

Source Code: https://github.com/Rea2er/dart-tutorial

#dart programming language #dart programming #dart #tutorial

Quinten  Boehm

Quinten Boehm

1626983580

2021 Dart Programming Language Tutorial for Beginners #7 Functions

Welcome to my 2021 Dart programming language tutorial to beginners #7. In this series you will
be introduced to functions, named parameter, positional parameter, recursion, higher order function, nested function, function closure, function scope and learn how to use them in Dart.

Source Code: https://github.com/Rea2er/dart-tutorial

#dart programming language #dart programming #dart #tutorial