New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ic0

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ic0 - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

lib/index.d.ts

@@ -29,3 +29,3 @@ import { HttpAgent } from '@dfinity/agent';

export declare function mockCanister(mocks: Mocks, parent?: Canister): MockCanister;
export {};
export default replicaCanister;
//# sourceMappingURL=index.d.ts.map

@@ -121,2 +121,3 @@ "use strict";

exports.mockCanister = mockCanister;
exports.default = replicaCanister;
//# sourceMappingURL=index.js.map
{
"name": "ic0",
"version": "0.0.2",
"version": "0.0.3",
"description": "An easy-to-use JavaScript API for the Internet Computer.",

@@ -5,0 +5,0 @@ "author": "Ryan Vandersmith (https://github.com/rvanasa)",

@@ -8,3 +8,3 @@

The `ic0` npm package makes it easier to interact with Internet Computer canisters
The `ic0` npm package makes it easier to interact with Internet Computer (IC) canisters
from development and testing environments.

@@ -18,5 +18,17 @@

## Replica Canister
## Quick Start
A **replica canister** represents a live canister running on the Internet Computer (or local replica), identified by a unique
Add the following code to your webapp (works out of the box when hosted on the IC):
```ts
import ic from 'ic0';
const ledger = ic('ryjl3-tyaaa-aaaaa-aaaba-cai'); // Access the IC ledger canister
console.log(await ledger.call('name')) // Call (or query) the `name` method
```
## Replica Canisters
A **replica canister** represents a live canister running on the IC (or local replica), identified by a unique
[Principal](https://medium.com/dfinity/internet-computer-basics-part-1-principals-and-identities-215e8f239da4).

@@ -51,3 +63,3 @@

## Dev Canister
## Dev Canisters

@@ -83,3 +95,3 @@ A **dev canister** makes it possible to interact with canisters provided by a live-reload development environment

## Mock Canister
## Mock Canisters

@@ -86,0 +98,0 @@ A **mock canister** makes it easy to mock the behavior of your canisters for unit tests.

@@ -147,1 +147,3 @@ import { Actor, ActorSubclass, HttpAgent, fetchCandid } from '@dfinity/agent';

}
export default replicaCanister;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc