-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #444 from hamster-shared/icp_bounty
Icp bounty
- Loading branch information
Showing
24 changed files
with
1,851 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
import httpRequest from "@/request"; | ||
|
||
|
||
export function getCanisterList(params:any) { | ||
return httpRequest({ | ||
url: "/api/icp/account/canisters", | ||
method: "get", | ||
params: params, | ||
}); | ||
} | ||
|
||
export function getCanisterOverview() { | ||
return httpRequest({ | ||
url: "/api/icp/account/overview", | ||
method: "get", | ||
}); | ||
} | ||
export function getIcpDetail(id:string) { | ||
return httpRequest({ | ||
url: `/api/icp/canister/${id}/overview`, | ||
method: "get", | ||
}); | ||
} | ||
export function getICpStatistics() { | ||
return httpRequest({ | ||
url: `/api/icp/account/brief`, | ||
method: "get", | ||
}); | ||
} | ||
export function addCanister(params:any) { | ||
return httpRequest({ | ||
url: `/api/icp/account/add-canister`, | ||
method: "post", | ||
data: params, | ||
}); | ||
} | ||
export function getControllers (params:any,id:string){ | ||
|
||
return httpRequest({ | ||
url: `/api/icp/canister/${id}/controllers`, | ||
method: "get", | ||
params, | ||
}); | ||
} | ||
export function getCs (params:any,id:string){ | ||
|
||
return httpRequest({ | ||
url: `/api/icp/canister/${id}/consumption`, | ||
method: "get", | ||
params, | ||
}); | ||
} | ||
|
||
export function handleStatus (params:any){ | ||
|
||
return httpRequest({ | ||
url: `/api/icp/canister/change-status`, | ||
method: "post", | ||
data:params, | ||
}); | ||
} | ||
|
||
export function addController (params:any) { | ||
return httpRequest({ | ||
url: `/api/icp/canister/add-controller`, | ||
method: "post", | ||
data:params, | ||
}); | ||
|
||
} | ||
export function addCycles (params:any) { | ||
return httpRequest({ | ||
url: `/api/icp/canister/add-cycles`, | ||
method: "post", | ||
data:params, | ||
}); | ||
|
||
} | ||
|
||
export function postInstall (params:any) { | ||
return httpRequest({ | ||
url: `/api/icp/canister/install`, | ||
method: "post", | ||
data:params, | ||
}); | ||
|
||
} | ||
|
||
export function uploadWasm (file:any,id:string) { | ||
return httpRequest({ | ||
url: `/api/icp/canister/${id}/upload`, | ||
method: "post", | ||
data:file, | ||
headers:{ | ||
'Content-Type': 'multipart/form-data' | ||
} | ||
}); | ||
} | ||
|
||
export function deleteController (params:any) { | ||
return httpRequest({ | ||
url: `/api/icp/canister/del-controller`, | ||
method: "post", | ||
data:params, | ||
}); | ||
|
||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.