Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

dfinity/icp-js-core

Open more actions menu

icp-js-core

NPM Version License

The source code repository for the @icp-sdk/core package - the official JavaScript SDK for building applications on the Internet Computer.

For Package Users

If you're looking to use the @icp-sdk/core package in your project, visit:

Quick Start

import { HttpAgent } from '@icp-sdk/core/agent';
import { Ed25519KeyIdentity } from '@icp-sdk/core/identity';
import { IDL } from '@icp-sdk/core/candid';
import { Principal } from '@icp-sdk/core/principal';

const identity = Ed25519KeyIdentity.generate();
const canisterId = Principal.fromText('uqqxf-5h777-77774-qaaaa-cai');

const agent = await HttpAgent.create({
  host: 'https://icp-api.io',
  identity,
});

// Send an update call to the canister
await agent.call(canisterId, {
  methodName: 'greet',
  arg: IDL.encode([IDL.Text], ['world']),
});

Contributing

This repository contains the source code for @icp-sdk/core and related packages. Contributions are welcome! Please refer to the CONTRIBUTING.md for details about setting up the development environment, running tests, and the review process.

License

This project is licensed under the Apache-2.0 License.

About

The base library to build applications on the Internet Computer.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors 65

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.