Skip to content

Private Endpoints

Private endpoints require authentication and are used for managing projects, subscriptions, and user-related data.

Portal

import { PortalApi } from "@accesstimeio/accesstime-common";
 
const timestamp = 1738262112n;
await PortalApi.setAuthConfig(timestamp, "0xCallerAddress", "0xAuthMessage", "0xAuthSignature");

Explore

GET - /v1/portal/explore/:chainId?page=&sort=&paymentMethods=&pageCursor=

import { PortalApi } from "@accesstimeio/accesstime-common";
 
const timestamp = 1738262112n;
await PortalApi.setAuthConfig(timestamp, "0xCallerAddress", "0xAuthMessage", "0xAuthSignature");
 
const explore = await PortalApi.explore(8453); 
// {
//     countProjects: number;
//     maxPage: number;
//     projects: [
//         {
//             id: Address;
//             avatarUrl: string | null;
//             votePoint: number;
//             voteParticipantCount: number;
//             isFavorited: boolean;
//             domainVerify: boolean;
//             portalVerify: boolean;
//             categories: number[];
//         }
//     ];
//     pageCursor: string | null;
// }

Project by Id

GET - /v1/portal/project/:chainId/:id

import { PortalApi } from "@accesstimeio/accesstime-common";
 
const timestamp = 1738262112n;
await PortalApi.setAuthConfig(timestamp, "0xCallerAddress", "0xAuthMessage", "0xAuthSignature");
 
const projectById = await PortalApi.projectById(8453, 0); 
// {
//     avatarUrl: string | null;
//     votePoint: number;
//     voteParticipantCount: number;
//     isFavorited: boolean;
//     domainVerify: boolean;
//     portalVerify: boolean;
//     categories: number[];
//     socials: PortalProjectSocial[];
//     contentUrl: string | null;
//     paymentMethods: Address[];
//     packages: PortalProjectPackage[];
// }

Project Toggle Favorite

POST - /v1/portal/project/:chainId/:id/toggle-favorite

import { PortalApi } from "@accesstimeio/accesstime-common";
 
const timestamp = 1738262112n;
await PortalApi.setAuthConfig(timestamp, "0xCallerAddress", "0xAuthMessage", "0xAuthSignature");
 
const toggleStatus = await PortalApi.toggleFavorite(8453, 0); 
// {
//     isFavoritedNow: boolean | null;
// }

Project Request Domain Verify

import { PortalApi } from "@accesstimeio/accesstime-common";
 
const timestamp = 1738262112n;
await PortalApi.setAuthConfig(timestamp, "0xCallerAddress", "0xAuthMessage", "0xAuthSignature");
 
const domainVerifyRequest = await PortalApi.requestDomainVerify(8453, 0); 
// {
//     domain: string;
//     recordKey: string;
//     recordValue: string;
// }

Project Check Domain Verify

import { PortalApi } from "@accesstimeio/accesstime-common";
 
const timestamp = 1738262112n;
await PortalApi.setAuthConfig(timestamp, "0xCallerAddress", "0xAuthMessage", "0xAuthSignature");
 
const domainVerifyStatus = await PortalApi.checkDomainVerify(8453, 0); 
// {
//     status: boolean;
// }

Update Project Avatar

POST - /v1/portal/creator/update-project-avatar/:chainId/:id

import { PortalApi } from "@accesstimeio/accesstime-common";
 
const timestamp = 1738262112n;
await PortalApi.setAuthConfig(timestamp, "0xCallerAddress", "0xAuthMessage", "0xAuthSignature");
 
const form = new FormData(); 
const file: File = new File([], ""); // max 300kb 
 
form.append("file", file); 
const avatarHash = await PortalApi.updateProjectAvatar(8453, 0, form); 
// https://s3.accesstime.io/${avatarHash}

Update Project Socials

POST - /v1/portal/creator/update-project-socials/:chainId/:id

import { PortalSocialType } from "@accesstimeio/accesstime-common"; 
import { PortalApi } from "@accesstimeio/accesstime-common";
 
const timestamp = 1738262112n;
await PortalApi.setAuthConfig(timestamp, "0xCallerAddress", "0xAuthMessage", "0xAuthSignature");
 
await PortalApi.updateProjectSocials(8453, 0, [ 
    { 
        type: PortalSocialType.GitHub, 
        url: "https://github.com/accesstimeio"
    }, 
    { 
        type: PortalSocialType.Twitter, 
        url: "https://x.com/accesstimeio"
    }, 
]); 

Update Project Categories

POST - /v1/portal/creator/update-project-categories/:chainId/:id

import { PortalCategory } from "@accesstimeio/accesstime-common"; 
import { PortalApi } from "@accesstimeio/accesstime-common";
 
const timestamp = 1738262112n;
await PortalApi.setAuthConfig(timestamp, "0xCallerAddress", "0xAuthMessage", "0xAuthSignature");
 
await PortalApi.updateProjectCategories(8453, 0, [ 
    PortalCategory.Business, 
    PortalCategory.Creativity 
]); 

Update Project Content

POST - /v1/portal/creator/update-project-content/:chainId/:id

import { PortalApi } from "@accesstimeio/accesstime-common";
 
const timestamp = 1738262112n;
await PortalApi.setAuthConfig(timestamp, "0xCallerAddress", "0xAuthMessage", "0xAuthSignature");
 
const form = new FormData(); 
const file: File = new File([], ""); // max 100kb 
 
form.append("file", file); 
const contentHash = await PortalApi.updateProjectContent(8453, 0, form); 
// https://s3.accesstime.io/${contentHash}

Update Project Packages

POST - /v1/portal/creator/update-project-packages/:chainId/:id

import { PortalApi } from "@accesstimeio/accesstime-common";
 
const timestamp = 1738262112n;
await PortalApi.setAuthConfig(timestamp, "0xCallerAddress", "0xAuthMessage", "0xAuthSignature");
 
await PortalApi.updateProjectPackages(8453, 0, [ 
    { 
        id: 0, // packageId
        title: "Best Weekly Package"
    }, 
    { 
        id: 1, // packageId
        title: "Monthly Package + 3 days Free"
    }, 
]); 

Update Project Package Image

POST - /v1/portal/creator/update-project-package-image/:chainId/:id/:packageId

import { PortalApi } from "@accesstimeio/accesstime-common";
 
const timestamp = 1738262112n;
await PortalApi.setAuthConfig(timestamp, "0xCallerAddress", "0xAuthMessage", "0xAuthSignature");
 
const packageId = 0; 
const form = new FormData(); 
const file: File = new File([], ""); // max 150kb 
 
form.append("file", file); 
const packageImageHash = await PortalApi.updateProjectPackageImage(8453, 0, packageId, form); 
// https://s3.accesstime.io/${packageImageHash}

Update Project Package Content

POST - /v1/portal/creator/update-project-package-content/:chainId/:id/:packageId

import { PortalApi } from "@accesstimeio/accesstime-common";
 
const timestamp = 1738262112n;
await PortalApi.setAuthConfig(timestamp, "0xCallerAddress", "0xAuthMessage", "0xAuthSignature");
 
const packageId = 0; 
const form = new FormData(); 
const file: File = new File([], ""); // max 100kb 
 
form.append("file", file); 
const packageContentHash = await PortalApi.updateProjectPackageContent(8453, 0, packageId, form); 
// https://s3.accesstime.io/${packageContentHash}