Type Alias: Replica
Replica =
object
Defined in: services/replica.ts:377
The interface for a replica connection (local or remote).
Properties
createActor()
createActor: <
_SERVICE>(params) =>Promise<ActorSubclass<_SERVICE>>
Defined in: services/replica.ts:395
Creates a typed actor for interacting with a canister.
Type Parameters
| Type Parameter |
|---|
_SERVICE |
Parameters
| Parameter | Type |
|---|---|
params | CreateActorParams |
Returns
Promise<ActorSubclass<_SERVICE>>
createCanister()
createCanister: (
params) =>Promise<string>
Defined in: services/replica.ts:393
Creates a new canister, returns the canister ID.
Parameters
| Parameter | Type |
|---|---|
params | CreateCanisterParams |
Returns
Promise<string>
getCanisterInfo()
getCanisterInfo: (
params) =>Promise<CanisterInfo>
Defined in: services/replica.ts:387
Gets detailed information about a canister.
Parameters
| Parameter | Type |
|---|---|
params | GetCanisterStatusParams |
Returns
Promise<CanisterInfo>
getCanisterStatus()
getCanisterStatus: (
params) =>Promise<CanisterStatus>
Defined in: services/replica.ts:385
Gets the status of a canister (running, stopped, etc.).
Parameters
| Parameter | Type |
|---|---|
params | GetCanisterStatusParams |
Returns
Promise<CanisterStatus>
getTopology()
getTopology: () =>
Promise<SubnetTopology[]>
Defined in: services/replica.ts:397
Gets the subnet topology.
Returns
Promise<SubnetTopology[]>
host
host:
string
Defined in: services/replica.ts:379
The host URL of the replica.
installCode()
installCode: (
params) =>Promise<void>
Defined in: services/replica.ts:383
Installs Wasm code to a canister.
Parameters
| Parameter | Type |
|---|---|
params | InstallCodeParams |
Returns
Promise<void>
port
port:
number
Defined in: services/replica.ts:381
The port number of the replica.
removeCanister()
removeCanister: (
params) =>Promise<void>
Defined in: services/replica.ts:391
Removes/deletes a canister.
Parameters
| Parameter | Type |
|---|---|
params | GetCanisterStatusParams |
Returns
Promise<void>
start()
start: (
ctx) =>Promise<void>
Defined in: services/replica.ts:399
Starts the replica.
Parameters
| Parameter | Type |
|---|---|
ctx | ReplicaContext |
Returns
Promise<void>
stop()
stop: (
args?,ctx?) =>Promise<void>
Defined in: services/replica.ts:401
Stops the replica.
Parameters
| Parameter | Type |
|---|---|
args? | StopOptions |
ctx? | ReplicaContext |
Returns
Promise<void>
stopCanister()
stopCanister: (
params) =>Promise<void>
Defined in: services/replica.ts:389
Stops a running canister.
Parameters
| Parameter | Type |
|---|---|
params | GetCanisterStatusParams |
Returns
Promise<void>