Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/polkadot/api/mod.ts>ApiPromise.create

Package publishing for deno.land/x/polkadot
Go to Latest
method ApiPromise.create
import { ApiPromise } from "https://deno.land/x/polkadot@0.2.25/api/mod.ts";

Examples

import Api from 'https://deno.land/x/polkadot@0.2.25/api/promise/index.ts';

Api.create().then(async (api) => {
  const timestamp = await api.query.timestamp.now();

  console.log(`lastest block timestamp ${timestamp}`);
});

Parameters

optional
options: ApiOptions

options that is passed to the class contructor. Can be either [[ApiOptions]] or a provider (see the constructor arguments)