Cheatsheet

Here's the list of all the current APIs available on Griptape.js.

Bootstrap API

import { gripApp } from '...';

gripApp(
  restUrl: string,
  providerGetter: AccountProviderGetter,
  runApp: () => void
): Promise<void>;
1
2
3
4
5
6
7

Contracts API

import { createContract, extendContract } from '...';

createContract(spec: ContractSpecification);
extendContract(def1: ContractDefintion, def2: ContractDefinition);
1
2
3
4

Viewing Keys API

import { viewingKeyManager } from '...';

viewingKeyManager.add(contract: ContractInstance, key: string);
viewingKeyManager.get(idOrAddress: string);
viewingKeyManager.set(contract: ContractInstance, key: string);
1
2
3
4
5

Keplr Utils

import { getKeplr } from '...';

getKeplr(): Promise<Keplr | undefined>;
1
2
3

Events API

import {
  onAccountAvailable,
  onAccountChange,
  onViewingKeyCreated
} from '...';

onAccountAvailable(callback: Callback);
onAccountChange(callback: Callback);
onViewingKeyCreated(callback: Callback);
1
2
3
4
5
6
7
8
9

Account Provider

import {
  getKeplrAccountProvider
} from '...';

getKeplrAccountProvider(): AccountProviderGetter;
1
2
3
4
5