From 9170c48a0f376787f592139a67a7f107250be65e Mon Sep 17 00:00:00 2001 From: yoojinko Date: Tue, 25 Jun 2024 07:48:47 +0000 Subject: [PATCH] deploy: aa6d6969c52de34e821a010bbe017e6112f91d8c --- classes/activity.Activity.html | 24 +++---- classes/ainft.AinftJs.html | 12 ++-- classes/ainft721Object.Ainft721Object.html | 40 ++++++------ classes/ainftToken.AinftToken.html | 28 ++++----- classes/auth.Auth.html | 42 ++++++------- classes/blockchainBase.BlockchainBase.html | 2 +- classes/chat_assistants.Assistants.html | 8 +-- classes/chat_chat.Chat.html | 8 +-- classes/chat_messages.Messages.html | 10 +-- classes/chat_threads.Threads.html | 8 +-- classes/common_ainizeUtil.AinizeAuth.html | 2 +- classes/credit.Credit.html | 50 +++++++-------- classes/discord.Discord.html | 36 +++++------ classes/eth.Eth.html | 34 +++++----- classes/event.Event.html | 42 ++++++------- classes/factoryBase.FactoryBase.html | 16 ++--- classes/nft.Nft.html | 36 +++++------ classes/personaModels.PersonaModels.html | 22 +++---- classes/store.Store.html | 62 +++++++++---------- classes/textToArt.TextToArt.html | 24 +++---- enums/types.ActivityStatus.html | 6 +- enums/types.AppCreditWithdrawStatus.html | 2 +- enums/types.EventStatus.html | 2 +- enums/types.HttpMethod.html | 2 +- enums/types.HttpMethodToAxiosMethod.html | 2 +- enums/types.ItemGiveStatus.html | 2 +- enums/types.JobType.html | 2 +- enums/types.ModelID.html | 2 +- enums/types.NftActivityType.html | 2 +- enums/types.Platforms.html | 2 +- enums/types.PurchaseStatus.html | 2 +- enums/types.ResponseStatus.html | 2 +- enums/types.RewardDistributeType.html | 2 +- enums/types.RewardTypeCategory.html | 2 +- enums/types.SchedulerID.html | 2 +- enums/types.ServiceType.html | 2 +- enums/types.StoreItemStatus.html | 2 +- enums/types.TaskTypeCategory.html | 2 +- enums/types.itemType.html | 2 +- interfaces/types.Account.html | 2 +- interfaces/types.Activity.html | 10 +-- interfaces/types.AddActivityParams.html | 10 +-- interfaces/types.AddAiHistoryParams.html | 14 ++--- interfaces/types.AddEventActivityParams.html | 10 +-- interfaces/types.AddNftSymbolParams.html | 10 +-- .../types.AinftObjectSearchResponse.html | 2 +- .../types.AinftTokenSearchResponse.html | 2 +- interfaces/types.Assistant.html | 14 ++--- interfaces/types.AssistantCreateParams.html | 10 +-- ...ypes.AssistantDeleteTransactionResult.html | 2 +- interfaces/types.AssistantDeleted.html | 4 +- .../types.AssistantTransactionResult.html | 2 +- interfaces/types.AssistantUpdateParams.html | 10 +-- interfaces/types.ChannelPersonaModelInfo.html | 4 +- interfaces/types.ChatConfiguration.html | 4 +- ...es.ChatConfigurationTransactionResult.html | 2 +- interfaces/types.ChatResponse.html | 2 +- interfaces/types.CreateEventParams.html | 18 +++--- interfaces/types.CreateItemParams.html | 16 ++--- interfaces/types.CreatePersonaModelInfo.html | 2 +- interfaces/types.CreditTransactionResult.html | 2 +- interfaces/types.DeleteAssetParams.html | 4 +- interfaces/types.DepositHistoryInfo.html | 2 +- interfaces/types.DepositTransaction.html | 16 ++--- interfaces/types.DiscordMessageInfo.html | 8 +-- interfaces/types.EventInfo.html | 22 +++---- interfaces/types.GetActivityParams.html | 10 +-- .../types.GetAppNftSymbolListParams.html | 2 +- interfaces/types.GetEventActivityParams.html | 10 +-- interfaces/types.GetItemHistoryParams.html | 8 +-- .../types.GetItemPurchaseHistoryParams.html | 10 +-- .../types.GetNftContractInfoParams.html | 8 +-- interfaces/types.GetNftParams.html | 10 +-- interfaces/types.GetNftSymbolParams.html | 4 +- .../types.GetNftsInAinCollectionParams.html | 2 +- .../types.GetNftsInCollectionParams.html | 2 +- .../types.GetNftsInEthContractParams.html | 2 +- .../types.GetPurchaseHistoryParams.html | 8 +-- .../types.GetSingleItemHistoryParams.html | 10 +-- .../types.GetUserItemHistoryParams.html | 10 +-- interfaces/types.GetUserNftListParams.html | 12 ++-- .../types.GetUserPurchaseHistoryParams.html | 10 +-- interfaces/types.InviteInfo.html | 6 +- interfaces/types.Item.html | 2 +- interfaces/types.ItemHistory.html | 2 +- interfaces/types.ItemTryOnParams.html | 16 ++--- interfaces/types.ItemUseParams.html | 10 +-- interfaces/types.LockupInfo.html | 6 +- interfaces/types.Message.html | 16 ++--- interfaces/types.MessageContentText.html | 2 +- interfaces/types.MessageCreateParams.html | 6 +- .../types.MessageTransactionResult.html | 2 +- interfaces/types.MessageUpdateParams.html | 2 +- .../types.MessagesTransactionResult.html | 2 +- interfaces/types.MintNftParams.html | 2 +- interfaces/types.NftSearchParams.html | 10 +-- interfaces/types.Page.html | 2 +- interfaces/types.PendingRewards.html | 2 +- interfaces/types.PersonaModelCreditInfo.html | 4 +- interfaces/types.PurchaseHistory.html | 2 +- interfaces/types.RegisterItemParams.html | 20 +++--- interfaces/types.RemoveNftSymbolParams.html | 4 +- interfaces/types.RewardAmount.html | 2 +- interfaces/types.RewardInfo.html | 2 +- interfaces/types.RewardInstance.html | 2 +- interfaces/types.RewardOptions.html | 2 +- interfaces/types.RewardType.html | 2 +- interfaces/types.SearchOption.html | 2 +- interfaces/types.SearchReponse.html | 2 +- interfaces/types.SerializedMessage.html | 2 +- interfaces/types.SetAinNftMetadataParams.html | 2 +- interfaces/types.SetEthNftMetadataParams.html | 10 +-- interfaces/types.SetNftMetadataParams.html | 10 +-- interfaces/types.StoreItem.html | 2 +- interfaces/types.StorePurchaseParams.html | 10 +-- interfaces/types.Task.html | 4 +- interfaces/types.TaskInstance.html | 2 +- interfaces/types.TaskType.html | 2 +- interfaces/types.Text.html | 2 +- interfaces/types.TextToArtParams.html | 2 +- interfaces/types.TextToArtResponse.html | 6 +- interfaces/types.TextToArtResult.html | 2 +- interfaces/types.TextToArtTxHash.html | 2 +- interfaces/types.Thread.html | 6 +- interfaces/types.ThreadCreateParams.html | 2 +- .../types.ThreadDeleteTransactionResult.html | 2 +- interfaces/types.ThreadDeleted.html | 4 +- interfaces/types.ThreadTransactionResult.html | 2 +- interfaces/types.ThreadUpdateParams.html | 2 +- interfaces/types.TokenUpdatePermission.html | 2 +- interfaces/types.TokenomicsEvent.html | 22 +++---- interfaces/types.TransactionResult.html | 2 +- interfaces/types.TransferNftParams.html | 2 +- ...types.UpdateEventActivityStatusParams.html | 10 +-- interfaces/types.UpdateItemParams.html | 14 ++--- interfaces/types.UpdateStoreItemParams.html | 18 +++--- .../types.UploadAssetFromBufferParams.html | 6 +- .../types.UploadAssetFromDataUrlParams.html | 6 +- interfaces/types.UploadAssetParams.html | 4 +- interfaces/types.User.html | 2 +- interfaces/types.UserItem.html | 2 +- interfaces/types.WithdrawInfo.html | 8 +-- interfaces/types.getTxBodyMintNftParams.html | 2 +- .../types.getTxBodySetNftMetadataParams.html | 2 +- .../types.getTxBodyTransferNftParams.html | 2 +- .../types.getTxbodyAddAiHistoryParams.html | 16 ++--- modules/common_util.html | 2 +- modules/constants.html | 2 +- modules/types.html | 10 +-- 149 files changed, 606 insertions(+), 606 deletions(-) diff --git a/classes/activity.Activity.html b/classes/activity.Activity.html index 88c55f00..bc33d71c 100644 --- a/classes/activity.Activity.html +++ b/classes/activity.Activity.html @@ -1,12 +1,12 @@ Activity | Ainft-Js
Options
All
  • Public
  • Public/Protected
  • All
Menu

This class supports add activities.
Do not create it directly; Get it from AinftJs instance.

-

Hierarchy

Index

Constructors

  • new Activity(ain: default, baseUrl: string, route?: string): Activity

Properties

ain: default
+

Hierarchy

Index

Constructors

  • new Activity(ain: default, baseUrl: string, route?: string): Activity

Properties

ain: default

The Ain object for sign and send transaction to AIN blockchain.

-
baseUrl: string = ''
+
baseUrl: string = ''

The base url of api server of AINFT Factory.

-
route: string
+
route: string

The subpath of api server request url.

-

Methods

Methods

  • Add activity.

    Parameters

    • appId: string

      The ID of app.

      @@ -18,11 +18,11 @@

      The type of activity.

    • Optional nftInfo: ActivityNftInfo

      Information about the NFTs used in the activity.

      -

    Returns Promise<any>

Returns Promise<any>

  • addNftRecord(appId: string, userId: string, nftInfo: ActivityNftInfo, label: string, data: any): Promise<any>

Returns Promise<any>

  • addNftRecord(appId: string, userId: string, nftInfo: ActivityNftInfo, label: string, data: any): Promise<any>
  • Adds a record accomplished with an NFT.

    Parameters

    • appId: string

      The ID of app.

      @@ -34,11 +34,11 @@

      The label of record.

    • data: any

      Data related to the activity.

      -

    Returns Promise<any>

Returns Promise<any>

  • Gets transaction body to add ai history with NFT. Sending the transaction must be done manually.

    Parameters

    Returns Promise<any>

    Returns transaction body without signature.

    -
  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>
  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>
  • Sends request that include form to api server of AINFT Factory. Used to upload asset data.

    Parameters

    • method: POST | PUT
      @@ -50,7 +50,7 @@
      • [key: string]: string
    • fileFields: {}

      The file fields of form.

      • [key: string]: { buffer: Buffer; filename: string }
        • buffer: Buffer
        • filename: string

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • Sends request to api server of AINFT Factory. Authenticate by signing data.

    Parameters

    • method: HttpMethod
      @@ -60,7 +60,7 @@
    • Optional data: Record<string, any>

      The data to be included in the api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • Sends request to api server of AINFT Factory. Used when authentication is not required.

    Parameters

    • method: HttpMethod
      @@ -72,11 +72,11 @@
    • Optional headers: AxiosRequestHeaders

      The headers of Http api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • setBaseUrl(baseUrl: string): void
  • setBaseUrl(baseUrl: string): void
  • signData(data: any): string | Promise<string>

Returns void

  • signData(data: any): string | Promise<string>
  • setAinWalletSigner(): void
  • setBaseUrl(baseUrl: string): void
  • Set a new baseUrl. Enter the AINFT server endpoint.

    Parameters

    • baseUrl: string
      -

    Returns void

  • setPrivateKey(privateKey: string): void

Returns void

  • setPrivateKey(privateKey: string): void
  • Set a new privateKey. From now on, you can access the apps that match your new privateKey.

    Parameters

    • privateKey: string
      -

    Returns void

  • setSigner(signer: Signer): void
  • createAccount(): Account

Generated using TypeDoc

\ No newline at end of file +

Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/ainft721Object.Ainft721Object.html b/classes/ainft721Object.Ainft721Object.html index d9c684d6..fc51f505 100644 --- a/classes/ainft721Object.Ainft721Object.html +++ b/classes/ainft721Object.Ainft721Object.html @@ -1,6 +1,6 @@ Ainft721Object | Ainft-Js
Options
All
  • Public
  • Public/Protected
  • All
Menu

The class of AINFT 721 object.

-

Hierarchy

Index

Constructors

  • new Ainft721Object(objectInfo: { id: string; name: string; owner: string; symbol: string }, ain: default, baseUrl: string): Ainft721Object

Hierarchy

Index

Constructors

  • new Ainft721Object(objectInfo: { id: string; name: string; owner: string; symbol: string }, ain: default, baseUrl: string): Ainft721Object
  • Constructor of Ainft721Object. Do not use it directly; use the nft.get() function instead.

    Parameters

    • objectInfo: { id: string; name: string; owner: string; symbol: string }
      @@ -17,30 +17,30 @@

      Ain instance to sign and send transaction to AIN blockchain.

    • baseUrl: string

      The base url to request api to AINFT factory server.

      -

    Returns Ainft721Object

Properties

ain: default
+

Returns Ainft721Object

Properties

ain: default

The Ain object for sign and send transaction to AIN blockchain.

-
appId: string
+
appId: string

The ID of app in AIN blockchain.

-
baseUrl: string = ''
+
baseUrl: string = ''

The base url of api server of AINFT Factory.

-
id: string
+
id: string

The ID of AINFT object.

-
name: string
+
name: string

The name of AINFT object.

-
owner: string
+
owner: string

Owner of AINFT object.

-
route: string
+
route: string

The subpath of api server request url.

-
symbol: string
+
symbol: string

The symbol of AINFT object.

-

Methods

Methods

  • Gets specific token object.

    Parameters

    • tokenId: string

      Token ID of AINFT.

    Returns Promise<AinftToken>

    Returns AINFT token instance.

    import AinftJs from '@ainft-team/ainft-js';

    const ainftJs = new AinftJs('YOUR-PRIVATE-KEY');
    async function main() {
    const ainftObject = await ainftJs.nft.get('YOUR-AINFT-OBJECT-ID');
    const ainft = await ainftObject.getToken('YOUR-TOKEN-ID);
    }
    -
  • getTxBodyForMint(ownerAddress: string, to: string, tokenId: string): Promise<any>
  • getTxBodyForMint(ownerAddress: string, to: string, tokenId: string): Promise<any>
  • Gets transaction body to mint token.

    Parameters

    • ownerAddress: string

      The address of the AINFT object owner.

      @@ -51,7 +51,7 @@

    Returns Promise<any>

    Returns transaction body without signature.

    import AinftJs from '@ainft-team/ainft-js';

    const ainftJs = new AinftJs('YOUR-PRIVATE-KEY');
    async function main() {
    const ainftObject = await ainftJs.nft.get('YOUR-AINFT-OBJECT-ID');
    const result = await ainftObject.getTxBodyForMint('RECEIVER-ADDRESS', 'TARGET-TOKEN-ID');
    console.log(result); // trasacntion body for mint.
    }
    -
  • getTxBodyForTransfer(from: string, to: string, tokenId: string): Promise<any>
  • getTxBodyForTransfer(from: string, to: string, tokenId: string): Promise<any>
  • Gets transaction body to transfer token.

    Parameters

    • from: string

      The address the AINFT will be send from.

      @@ -62,7 +62,7 @@

    Returns Promise<any>

    Returns transaction body without signature.

    import AinftJs from '@ainft-team/ainft-js';

    const ainftJs = new AinftJs('YOUR-PRIVATE-KEY');
    async function main() {
    const ainftObject = await ainftJs.nft.get('YOUR-AINFT-OBJECT-ID');
    const result = await ainftObject.getTxBodyForTransfer('SENDER-ADDRESS', 'RECEIVER-ADDRESS', 'TARGET-TOKEN-ID');
    console.log(result); // trasacntion body for transfer.
    }
    -
  • mint(to: string, tokenId: string): Promise<any>
  • mint(to: string, tokenId: string): Promise<any>
  • Mints new token.

    Parameters

    • to: string

      The address the AINFT will be minted.

      @@ -71,7 +71,7 @@

    Returns Promise<any>

    Returns transaction result.

    import AinftJs from '@ainft-team/ainft-js';

    const ainftJs = new AinftJs('YOUR-PRIVATE-KEY');
    async function main() {
    const ainftObject = await ainftJs.nft.get('YOUR-AINFT-OBJECT-ID');
    const result = await ainftObject.mint('RECEIVER-ADDRESS', 'TARGET-TOKEN-ID');
    console.log(result); // result of transaction.
    }
    -
  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>
  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>
  • Sends request that include form to api server of AINFT Factory. Used to upload asset data.

    Parameters

    • method: POST | PUT
      @@ -83,7 +83,7 @@
      • [key: string]: string
    • fileFields: {}

      The file fields of form.

      • [key: string]: { buffer: Buffer; filename: string }
        • buffer: Buffer
        • filename: string

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • Sends request to api server of AINFT Factory. Authenticate by signing data.

    Parameters

    • method: HttpMethod
      @@ -93,7 +93,7 @@
    • Optional data: Record<string, any>

      The data to be included in the api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • Sends request to api server of AINFT Factory. Used when authentication is not required.

    Parameters

    • method: HttpMethod
      @@ -105,16 +105,16 @@
    • Optional headers: AxiosRequestHeaders

      The headers of Http api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • setBaseUrl(baseUrl: string): void
  • setBaseUrl(baseUrl: string): void
  • signData(data: any): string | Promise<string>

Returns void

  • signData(data: any): string | Promise<string>
  • Sign the data with the private key that the user has registered.

    Parameters

    • data: any

      The data to sign.

    Returns string | Promise<string>

    Returns signature string.

    -
  • transfer(from: string, to: string, tokenId: string): Promise<any>
  • transfer(from: string, to: string, tokenId: string): Promise<any>
  • Transfers token to other account.

    Parameters

    • from: string

      The address the AINFT will be send from.

      @@ -125,7 +125,7 @@

    Returns Promise<any>

    Returns transaction result.

    import AinftJs from '@ainft-team/ainft-js';

    const ainftJs = new AinftJs('YOUR-PRIVATE-KEY');
    async function main() {
    const ainftObject = await ainftJs.nft.get('YOUR-AINFT-OBJECT-ID');
    const result = await ainftObject.transfer('SENDER-ADDRESS', 'RECEIVER-ADDRESS', 'TARGET-TOKEN-ID');
    console.log(result); // result of transaction.
    }
    -
  • getAppId(id: string): string
  • getAppId(id: string): string

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/ainftToken.AinftToken.html b/classes/ainftToken.AinftToken.html index 3d04c70f..c2ef7ffd 100644 --- a/classes/ainftToken.AinftToken.html +++ b/classes/ainftToken.AinftToken.html @@ -1,6 +1,6 @@ AinftToken | Ainft-Js
Options
All
  • Public
  • Public/Protected
  • All
Menu

The class of AINFT Token.

-

Hierarchy

Index

Constructors

  • new AinftToken(tokenInfo: { ainftObjectId: string; metadata?: object; tokenId: string; tokenURI: string }, ain: default, baseUrl: string): AinftToken

Hierarchy

Index

Constructors

  • new AinftToken(tokenInfo: { ainftObjectId: string; metadata?: object; tokenId: string; tokenURI: string }, ain: default, baseUrl: string): AinftToken
  • Create AinftToken instance. Do not use it directly; use the Ainft721Object.getToken() function instead.

    Parameters

    • tokenInfo: { ainftObjectId: string; metadata?: object; tokenId: string; tokenURI: string }
      @@ -17,21 +17,21 @@

      Ain instance to sign and send transaction to AIN blockchain.

    • baseUrl: string

      The base url to request api to AINFT factory server.

      -

    Returns AinftToken

Properties

ain: default
+

Returns AinftToken

Properties

ain: default

The Ain object for sign and send transaction to AIN blockchain.

-
ainftObjectId: string
+
ainftObjectId: string

The AINFT object ID of AINFT.

-
baseUrl: string = ''
+
baseUrl: string = ''

The base url of api server of AINFT Factory.

-
metadata?: object
+
metadata?: object

The metadata of AINFT.

-
route: string
+
route: string

The subpath of api server request url.

-
tokenId: string
+
tokenId: string

The token ID of AINFT.

-
tokenURI: string
+
tokenURI: string

The token URI of AINFT's metadata.

-

Methods

  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>

Methods

  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>
  • Sends request that include form to api server of AINFT Factory. Used to upload asset data.

    Parameters

    • method: POST | PUT
      @@ -43,7 +43,7 @@
      • [key: string]: string
    • fileFields: {}

      The file fields of form.

      • [key: string]: { buffer: Buffer; filename: string }
        • buffer: Buffer
        • filename: string

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • Sends request to api server of AINFT Factory. Authenticate by signing data.

    Parameters

    • method: HttpMethod
      @@ -53,7 +53,7 @@
    • Optional data: Record<string, any>

      The data to be included in the api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • Sends request to api server of AINFT Factory. Used when authentication is not required.

    Parameters

    • method: HttpMethod
      @@ -65,18 +65,18 @@
    • Optional headers: AxiosRequestHeaders

      The headers of Http api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • setBaseUrl(baseUrl: string): void
  • setBaseUrl(baseUrl: string): void
  • setMetadata(metadata: object): Promise<any>

Returns void

  • setMetadata(metadata: object): Promise<any>
  • Sets AINFT's metadata.

    Parameters

    • metadata: object

      The value to be set as metadata for the AINFT.

    Returns Promise<any>

    Returns transaction result.

    import AinftJs from '@ainft-team/ainft-js';

    const ainftJs = new AinftJs('YOUR-PRIVATE-KEY');
    async function main() {
    const ainftObject = await ainftJs.nft.get('YOUR-AINFT-OBJECT-ID');
    const ainft = await ainftObject.getToken('YOUR-TOKEN-ID);
    const metadata = {
    image: '...',
    }
    const result = await ainft.setMetadata(metadata);
    console.log(result) // result of transaction.
    }
    -
  • signData(data: any): string | Promise<string>
  • signData(data: any): string | Promise<string>
  • addOwners(appId: string, owners: string[]): Promise<string>
  • You can add blockchain app owners.

    Parameters

    • appId: string

      The ID of app.

    • owners: string[]

      The list of addresses to be owner.

    Returns Promise<string>

    transaction hash

    -
  • addUserEthAddress(appId: string, userId: string, ethAddress: string): Promise<User>
  • addUserEthAddress(appId: string, userId: string, ethAddress: string): Promise<User>
  • Adds ETH address info to AINFT factory user.

    Parameters

    • appId: string

      The ID of app.

      @@ -31,41 +31,41 @@

      The ID of user.

    • ethAddress: string

      The ethereum address to add.

      -

    Returns Promise<User>

  • createAdmin(appId: string, userId: string): Promise<User>

Returns Promise<User>

  • createAdmin(appId: string, userId: string): Promise<User>
  • Create AINFT factory admin user in app.

    Parameters

    • appId: string

      The ID of app.

    • userId: string

      The ID of user to be admin.

      -

    Returns Promise<User>

  • createApp(appname: string): Promise<any>

Returns Promise<User>

  • createApp(appname: string): Promise<any>
  • Creates AIN Blockchain app using private key.

    Parameters

    • appname: string

      The name of app.

    Returns Promise<any>

    Returns transaction result.

    -
  • createUser(appId: string, userId: string): Promise<User>
  • createUser(appId: string, userId: string): Promise<User>
  • Creates AINFT factory user in app.

    Parameters

    • appId: string

      The ID of app.

    • userId: string

      The ID of user to create.

      -

    Returns Promise<User>

  • delegateApp(appId: string): Promise<any>

Returns Promise<User>

  • delegateApp(appId: string): Promise<any>
  • Sends transaction to delegate app using private key. App permission is obtained from ainft factory, and trigger function for ainft is registered.

    Parameters

    • appId: string

      The ID of app.

      -

    Returns Promise<any>

  • getTxBodyForDelegateApp(appId: string): Promise<any>

Returns Promise<any>

  • getTxBodyForDelegateApp(appId: string): Promise<any>
  • Gets transaction body to delegate app. App permission is obtained from AINFT factory, and trigger function for ainft is registered.

    Parameters

    • appId: string

      The ID of app.

      -

    Returns Promise<any>

  • getUser(appId: string, userId: string): Promise<User>

Returns Promise<any>

  • getUser(appId: string, userId: string): Promise<User>
  • Gets AINFT factory user in app.

    Parameters

    • appId: string

      The ID of app.

    • userId: string

      The ID of user to get.

    Returns Promise<User>

    Return user information.

    -
  • getUserDepositAddress(appId: string, userId: string, chain: string): Promise<string>
  • getUserDepositAddress(appId: string, userId: string, chain: string): Promise<string>
  • You can get user deposit crypto address. If user doesn't have address, create new deposit account.

    Parameters

    • appId: string
      @@ -74,13 +74,13 @@

      The ID of user.

    • chain: string

      The symbol of chain.

      -

    Returns Promise<string>

  • registerBlockchainApp(appId: string, accessAinAddress?: string): Promise<any>

Returns Promise<string>

  • registerBlockchainApp(appId: string, accessAinAddress?: string): Promise<any>
  • Registers exsiting AIN blockchain app to AINFT Factory.

    Parameters

    • appId: string

      The ID of app.

    • Optional accessAinAddress: string

      This is the address of the account that will be accessible to the AINFT Factory app. If not set, it is set to the address of the account set as the privateKey.

      -

    Returns Promise<any>

  • removeManagedContract(appId: string, chain: string, network: string, contractAddress: string): Promise<void>

Returns Promise<any>

  • removeManagedContract(appId: string, chain: string, network: string, contractAddress: string): Promise<void>
  • Removes managed contract.

    Parameters

    • appId: string

      The ID of app.

      @@ -90,7 +90,7 @@

      The name of network.

    • contractAddress: string

      The address of contract.

      -

    Returns Promise<void>

  • removeUserEthAddress(appId: string, userId: string, ethAddress: string): Promise<User>

Returns Promise<void>

  • removeUserEthAddress(appId: string, userId: string, ethAddress: string): Promise<User>
  • Removes ETH address info from user.

    Parameters

    • appId: string

      The ID of app.

      @@ -98,7 +98,7 @@

      The ID of user.

    • ethAddress: string

      The ethereum address to delete.

      -

    Returns Promise<User>

  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>

Returns Promise<User>

  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>
  • Sends request that include form to api server of AINFT Factory. Used to upload asset data.

    Parameters

    • method: POST | PUT
      @@ -110,7 +110,7 @@
      • [key: string]: string
    • fileFields: {}

      The file fields of form.

      • [key: string]: { buffer: Buffer; filename: string }
        • buffer: Buffer
        • filename: string

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • Sends request to api server of AINFT Factory. Authenticate by signing data.

    Parameters

    • method: HttpMethod
      @@ -120,7 +120,7 @@
    • Optional data: Record<string, any>

      The data to be included in the api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • Sends request to api server of AINFT Factory. Used when authentication is not required.

    Parameters

    • method: HttpMethod
      @@ -132,11 +132,11 @@
    • Optional headers: AxiosRequestHeaders

      The headers of Http api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • setBaseUrl(baseUrl: string): void
  • setBaseUrl(baseUrl: string): void
  • signData(data: any): string | Promise<string>

Returns void

  • signData(data: any): string | Promise<string>
  • waitForRun(threadId: string, runId: string, service: default): Promise<void>
  • Parameters

    • threadId: string
    • runId: string
    • service: default

    Returns Promise<void>

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/chat_threads.Threads.html b/classes/chat_threads.Threads.html index e14cf308..f98baa35 100644 --- a/classes/chat_threads.Threads.html +++ b/classes/chat_threads.Threads.html @@ -1,6 +1,6 @@ Threads | Ainft-Js
Options
All
  • Public
  • Public/Protected
  • All
Menu

This class supports create threads that assistant can interact with.
Do not create it directly; Get it from AinftJs instance.

-

Hierarchy

Index

Constructors

  • new Threads(ain: default, ainize: default): Threads

Properties

ain: default
ainize: default

Methods

  • buildTxBodyForCreateThread(thread: Thread, appId: string, tokenId: string, serviceName: string, address: string): TransactionInput
  • Parameters

    • thread: Thread
    • appId: string
    • tokenId: string
    • serviceName: string
    • address: string

    Returns TransactionInput

  • buildTxBodyForDeleteThread(threadId: string, appId: string, tokenId: string, serviceName: string, address: string): TransactionInput
  • Parameters

    • threadId: string
    • appId: string
    • tokenId: string
    • serviceName: string
    • address: string

    Returns TransactionInput

  • buildTxBodyForUpdateThread(thread: Thread, appId: string, tokenId: string, serviceName: string, address: string): Promise<TransactionInput>
  • Parameters

    • thread: Thread
    • appId: string
    • tokenId: string
    • serviceName: string
    • address: string

    Returns Promise<TransactionInput>

Hierarchy

Index

Constructors

  • new Threads(ain: default, ainize: default): Threads

Properties

ain: default
ainize: default

Methods

  • buildTxBodyForCreateThread(thread: Thread, appId: string, tokenId: string, serviceName: string, address: string): TransactionInput
  • Parameters

    • thread: Thread
    • appId: string
    • tokenId: string
    • serviceName: string
    • address: string

    Returns TransactionInput

  • buildTxBodyForDeleteThread(threadId: string, appId: string, tokenId: string, serviceName: string, address: string): TransactionInput
  • Parameters

    • threadId: string
    • appId: string
    • tokenId: string
    • serviceName: string
    • address: string

    Returns TransactionInput

  • buildTxBodyForUpdateThread(thread: Thread, appId: string, tokenId: string, serviceName: string, address: string): Promise<TransactionInput>
  • Parameters

    • thread: Thread
    • appId: string
    • tokenId: string
    • serviceName: string
    • address: string

    Returns Promise<TransactionInput>

  • Create a thread.

    Parameters

    • objectId: string

      The ID of AINFT object.

      @@ -11,7 +11,7 @@
    • ThreadCreateParams: ThreadCreateParams

      The parameters to create thread.

    Returns Promise<ThreadTransactionResult>

    Returns a promise that resolves with both the transaction result and the created thread.

    -
  • Deletes a thread.

    Parameters

    • threadId: string

      The ID of thread.

      @@ -22,7 +22,7 @@
    • nickname: string

      The service nickname to use.

    Returns Promise<ThreadDeleteTransactionResult>

    Returns a promise that resolves with both the transaction result and the deleted thread.

    -
  • get(threadId: string, objectId: string, tokenId: string, nickname: string): Promise<Thread>
  • get(threadId: string, objectId: string, tokenId: string, nickname: string): Promise<Thread>
  • Retrieves a thread.

    Parameters

    • threadId: string

      The ID of thread.

      @@ -33,7 +33,7 @@
    • nickname: string

      The service nickname to use.

    Returns Promise<Thread>

    Returns a promise that resolves with the thread.

    -
  • createAppCredit(appId: string, symbol: string, name: string, maxSupply?: number): Promise<AppCreditInfo>
  • Creates credit to use in app.

    Parameters

    • appId: string

      The ID of app.

      @@ -28,26 +28,26 @@

      The name of credit.

    • Optional maxSupply: number

      Maximum number of credits that can be generated.

      -

    Returns Promise<AppCreditInfo>

  • deleteAppCredit(appId: string, symbol: string): Promise<void>

Returns Promise<AppCreditInfo>

  • deleteAppCredit(appId: string, symbol: string): Promise<void>
  • Deletes app credit.

    Parameters

    • appId: string

      The ID of app.

    • symbol: string

      The symbol of credit.

      -

    Returns Promise<void>

Returns Promise<void>

  • Deposits user's credits to Crypto tokens.

    Parameters

    • appId: string

      The ID of app.

    • transaction: DepositTransaction

      The transaction information about deposit.

      -

    Returns Promise<void>

  • getAppCredit(appId: string, symbol: string): Promise<AppCreditInfo>

Returns Promise<void>

  • getAppCredit(appId: string, symbol: string): Promise<AppCreditInfo>
  • Gets app credit info.

    Parameters

    • appId: string

      The ID of app.

    • symbol: string

      The symbol of credit.

    Returns Promise<AppCreditInfo>

    Returns credit information.

    -
  • getCreditBalanceOfUser(appId: string, symbol: string, userId: string): Promise<number>
  • getCreditBalanceOfUser(appId: string, symbol: string, userId: string): Promise<number>
  • Get the user's credit balance

    Parameters

    • appId: string

      The ID of app.

      @@ -56,7 +56,7 @@
    • userId: string

      The ID of user.

    Returns Promise<number>

    A Promise that resolves to the credit balance of the user

    -
  • getCreditBalances(appId: string, symbol: string): Promise<{}>
  • getCreditBalances(appId: string, symbol: string): Promise<{}>
  • Get the credit balance of all users

    Parameters

    • appId: string

      The ID of app.

      @@ -65,7 +65,7 @@

    Returns Promise<{}>

    } A Promise that resolves to the credit balance of all users.

    -
  • getDepositHistory(appId: string, userId: string, chain?: string): Promise<DepositHistory>
  • getDepositHistory(appId: string, userId: string, chain?: string): Promise<DepositHistory>
  • Gets user's deposit history.

    Parameters

    • appId: string

      The ID of app.

      @@ -74,7 +74,7 @@
    • Optional chain: string

      The symbol of chain.

    Returns Promise<DepositHistory>

    Returns depositHistory list of user.

    -
  • getUserLockupList(appId: string, symbol: string, userId: string): Promise<LockupList>
  • getUserLockupList(appId: string, symbol: string, userId: string): Promise<LockupList>
  • Gets a user's lockup list.

    Parameters

    • appId: string

      The ID of app.

      @@ -83,14 +83,14 @@
    • userId: string

      The ID of user.

    Returns Promise<LockupList>

    Returns lockup list by userId.

    -
  • You can get withdrawal list applied by all users

    Parameters

    • appId: string

      The ID of app.

    • symbol: string

      The symbol of credit.

    Returns Promise<AppWithdrawList>

    Return AppWithdrawList Object

    -
  • getWithdrawListByUserId(appId: string, symbol: string, userId: string): Promise<UserWithdrawList>
  • getWithdrawListByUserId(appId: string, symbol: string, userId: string): Promise<UserWithdrawList>
  • You can get withdrawal list apllied by one user

    Parameters

    • appId: string

      The ID of app.

      @@ -99,7 +99,7 @@
    • userId: string

      The ID of user.

    Returns Promise<UserWithdrawList>

    Return UserWithdrawList Object

    -
  • lockupUserBalance(appId: string, symbol: string, userId: string, amount: number, endAt: number, reason?: string): Promise<void>
  • lockupUserBalance(appId: string, symbol: string, userId: string, amount: number, endAt: number, reason?: string): Promise<void>
  • You can restrict the user to leave a certain amount of credit

    Parameters

    • appId: string

      The ID of app.

      @@ -113,7 +113,7 @@

      The timestamp when the lockup period ends.

    • Optional reason: string

      The reason for the lockup.

      -

    Returns Promise<void>

  • mintAppCredit(appId: string, symbol: string, to: string, amount: number, payload?: object): Promise<void>

Returns Promise<void>

  • mintAppCredit(appId: string, symbol: string, to: string, amount: number, payload?: object): Promise<void>
  • Mints app credit to user.

    Parameters

    • appId: string

      The ID of app.

      @@ -125,7 +125,7 @@

      The amount of credit to mint.

    • Optional payload: object

      The additional data about minting.

      -

    Returns Promise<void>

  • rejectWithdrawal(appId: string, symbol: string, requestMap: WithdrawRequestMap, reason: string): Promise<void>

Returns Promise<void>

  • rejectWithdrawal(appId: string, symbol: string, requestMap: WithdrawRequestMap, reason: string): Promise<void>
  • Rejects requested withdrawals.

    Parameters

    • appId: string

      The ID of app.

      @@ -135,7 +135,7 @@

      A map containing withdrawal request information to reject.

    • reason: string

      The reason for the reject.

      -

    Returns Promise<void>

  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>

Returns Promise<void>

  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>
  • Sends request that include form to api server of AINFT Factory. Used to upload asset data.

    Parameters

    • method: POST | PUT
      @@ -147,7 +147,7 @@
      • [key: string]: string
    • fileFields: {}

      The file fields of form.

      • [key: string]: { buffer: Buffer; filename: string }
        • buffer: Buffer
        • filename: string

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • Sends request to api server of AINFT Factory. Authenticate by signing data.

    Parameters

    • method: HttpMethod
      @@ -157,7 +157,7 @@
    • Optional data: Record<string, any>

      The data to be included in the api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • Sends request to api server of AINFT Factory. Used when authentication is not required.

    Parameters

    • method: HttpMethod
      @@ -169,16 +169,16 @@
    • Optional headers: AxiosRequestHeaders

      The headers of Http api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • setBaseUrl(baseUrl: string): void
  • setBaseUrl(baseUrl: string): void
  • signData(data: any): string | Promise<string>

Returns void

  • signData(data: any): string | Promise<string>
  • Sign the data with the private key that the user has registered.

    Parameters

    • data: any

      The data to sign.

    Returns string | Promise<string>

    Returns signature string.

    -
  • transferAppCredit(appId: string, symbol: string, from: string, to: string, amount: number, payload?: object): Promise<void>
  • transferAppCredit(appId: string, symbol: string, from: string, to: string, amount: number, payload?: object): Promise<void>
  • Transfer app credit to user.

    Parameters

    • appId: string

      The ID of app.

      @@ -192,7 +192,7 @@

      The amount of credit to transfer.

    • Optional payload: object

      The additional data about transferring.

      -

    Returns Promise<void>

  • withdrawAppCredit(appId: string, symbol: string, userId: string, chain: string, amount: number, userAddress: string): Promise<void>

Returns Promise<void>

  • withdrawAppCredit(appId: string, symbol: string, userId: string, chain: string, amount: number, userAddress: string): Promise<void>
  • You can request withdraw app credit to crypto wallet.

    Parameters

    • appId: string

      The ID of app.

      @@ -206,7 +206,7 @@

      The amount of withdraw credit.

    • userAddress: string

      The address where will receive withdraw credit.

      -

    Returns Promise<void>

  • withdrawComplete(appId: string, symbol: string, requestMap: WithdrawRequestMap, txHash: string): Promise<void>

Returns Promise<void>

  • withdrawComplete(appId: string, symbol: string, requestMap: WithdrawRequestMap, txHash: string): Promise<void>
  • connectDiscordWithApp(appId: string, discordGuildId: string): Promise<void>
  • Connects discord server and AINFT Factory app. A Discord server can only connect to one app.

    Parameters

    • appId: string

      The ID of app.

    • discordGuildId: string

      The discord guild ID to which app will be linked.

      -

    Returns Promise<void>

  • deletePersonaModelFromDiscordChannel(appId: string, discordGuildId: string, discordChannelId: string): Promise<void>

Returns Promise<void>

  • deletePersonaModelFromDiscordChannel(appId: string, discordGuildId: string, discordChannelId: string): Promise<void>
  • Disconnects persona model with discord channel.

    Parameters

    • appId: string

      The ID of app.

      @@ -47,21 +47,21 @@

      The discord guild ID to which the model will be disconnected.

    • discordChannelId: string

      The discord channel ID to which the model will be disconnected.

      -

    Returns Promise<void>

  • getConnectedApp(discordGuildId: string, appId?: string): Promise<null | string>

Returns Promise<void>

  • getConnectedApp(discordGuildId: string, appId?: string): Promise<null | string>
  • Gets the appId connected with the Discord guild.

    Parameters

    • discordGuildId: string

      The ID of discord guild.

    • appId: string = ''

      The ID of app.

    Returns Promise<null | string>

    Returns connected app Id or null.

    -
  • getConnectedEventsByServer(appId: string, discordGuildId: string): Promise<(null | EventInfo)[]>
  • getConnectedEventsByServer(appId: string, discordGuildId: string): Promise<(null | EventInfo)[]>
  • Get event list connected with the Discord server

    Parameters

    • appId: string

      The ID of app.

    • discordGuildId: string

      The ID of discord guild.

    Returns Promise<(null | EventInfo)[]>

    Returns event list connected discord guild.

    -
  • getConnectedTasksByChannel(appId: string, discordGuildId: string, discordChannelId: string): Promise<TaskIdListByEventId>
  • getConnectedTasksByChannel(appId: string, discordGuildId: string, discordChannelId: string): Promise<TaskIdListByEventId>
  • Gets tasks connected with discord channel

    Parameters

    • appId: string

      The ID of app.

      @@ -70,7 +70,7 @@
    • discordChannelId: string

      The ID of discord channel.

    Returns Promise<TaskIdListByEventId>

    Returns a map of task IDs for each event ID.

    -
  • getInviteInfo(appId: string, discordGuildId: string, inviteeId: string): Promise<InviteInfo>
  • getInviteInfo(appId: string, discordGuildId: string, inviteeId: string): Promise<InviteInfo>
  • You can get user's invitation information.

    Parameters

    • appId: string

      The ID of app.

      @@ -79,7 +79,7 @@
    • inviteeId: string

      The ID of invitee.

    Returns Promise<InviteInfo>

    Return InviteInfo object.

    -
  • getPersonaModelForDiscordChannel(appId: string, discordGuildId: string, discordChannelId: string): Promise<null | ChannelPersonaModelInfo>
  • getPersonaModelForDiscordChannel(appId: string, discordGuildId: string, discordChannelId: string): Promise<null | ChannelPersonaModelInfo>
  • Gets persona model connected with discord channel.

    Parameters

    • appId: string

      The ID of app.

      @@ -87,14 +87,14 @@

      The discord guild ID to which model was connected.

    • discordChannelId: string

      The discord channel ID to which model was connected.

      -

    Returns Promise<null | ChannelPersonaModelInfo>

  • getPersonaModelForDiscordServer(appId: string, discordGuildId: string): Promise<null | ServerPersonaModelInfo>

Returns Promise<null | ChannelPersonaModelInfo>

  • getPersonaModelForDiscordServer(appId: string, discordGuildId: string): Promise<null | ServerPersonaModelInfo>
  • Gets persona models connected with discord server.

    Parameters

    • appId: string

      The ID of app.

    • discordGuildId: string

      The discord build ID to which model was connected.

    Returns Promise<null | ServerPersonaModelInfo>

    Returns a Map of information about the models linked to each channel in the guild."

    -
  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>
  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>
  • Sends request that include form to api server of AINFT Factory. Used to upload asset data.

    Parameters

    • method: POST | PUT
      @@ -106,7 +106,7 @@
      • [key: string]: string
    • fileFields: {}

      The file fields of form.

      • [key: string]: { buffer: Buffer; filename: string }
        • buffer: Buffer
        • filename: string

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • Sends request to api server of AINFT Factory. Authenticate by signing data.

    Parameters

    • method: HttpMethod
      @@ -116,7 +116,7 @@
    • Optional data: Record<string, any>

      The data to be included in the api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • Sends request to api server of AINFT Factory. Used when authentication is not required.

    Parameters

    • method: HttpMethod
      @@ -128,11 +128,11 @@
    • Optional headers: AxiosRequestHeaders

      The headers of Http api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • setBaseUrl(baseUrl: string): void
  • setBaseUrl(baseUrl: string): void
  • signData(data: any): string | Promise<string>

Returns void

  • signData(data: any): string | Promise<string>
  • Gets NFT symbol list in app.

    Parameters

    Returns Promise<string[]>

    Returns a list of symbols registered in the app.

    -
  • Gets NFT info by network, contractAddress and tokenId. Symbol must be added.

    Parameters

    • GetNftParams: GetNftParams

      The parameters to get NFT information.

    Returns Promise<NftToken>

    Returns NFT information.

    -
  • Gets contract info by network and contractAddress. Symbol must be added.

    Parameters

    Returns Promise<NftContractInfo>

    Returns contract information.

    -
  • Gets NFT list by user address.

    Parameters

    Returns Promise<NftCollections>

    Returns NFTs owned by the user along with their contract information.

    -
  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>
  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>
  • Sends request that include form to api server of AINFT Factory. Used to upload asset data.

    Parameters

    • method: POST | PUT
      @@ -57,7 +57,7 @@
      • [key: string]: string
    • fileFields: {}

      The file fields of form.

      • [key: string]: { buffer: Buffer; filename: string }
        • buffer: Buffer
        • filename: string

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • Sends request to api server of AINFT Factory. Authenticate by signing data.

    Parameters

    • method: HttpMethod
      @@ -67,7 +67,7 @@
    • Optional data: Record<string, any>

      The data to be included in the api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • Sends request to api server of AINFT Factory. Used when authentication is not required.

    Parameters

    • method: HttpMethod
      @@ -79,16 +79,16 @@
    • Optional headers: AxiosRequestHeaders

      The headers of Http api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • setBaseUrl(baseUrl: string): void
  • setBaseUrl(baseUrl: string): void

Returns void

  • signData(data: any): string | Promise<string>
  • signData(data: any): string | Promise<string>
  • delete(appId: string, eventId: string): Promise<void>
  • Deletes an event.

    Parameters

    • appId: string

      The ID of app.

    • eventId: string

      The ID of event.

      -

    Returns Promise<void>

Returns Promise<void>

  • Gets event.

    Parameters

    • appId: string

      The ID of app.

    • eventId: string

      The ID of event.

    Returns Promise<TokenomicsEvent>

    Returns event information.

    -
  • Gets activity information.

    Parameters

    Returns Promise<null | Activity>

    Returns activity object or null.

    -
  • getActivityHistory(appId: string, userId: string, eventId: string): Promise<Activity[]>
  • getActivityHistory(appId: string, userId: string, eventId: string): Promise<Activity[]>
  • Returns list of user's activity.

    Parameters

    • appId: string

      The ID of app.

      @@ -41,7 +41,7 @@

      The ID of the user who wants to check the activity history.

    • eventId: string

      The ID of the event you want to check activity history.

      -

    Returns Promise<Activity[]>

  • getPendingRewards(appId: string, userId: string, eventId: string): Promise<PendingRewards>

Returns Promise<Activity[]>

  • getPendingRewards(appId: string, userId: string, eventId: string): Promise<PendingRewards>
  • Return user's pending reward from event.

    Parameters

    • appId: string

      The ID of app.

      @@ -49,7 +49,7 @@

      The ID of the user who wants to check pending rewards.

    • eventId: string

      The ID of event to check pending rewards.

      -

    Returns Promise<PendingRewards>

  • getRewardHistory(appId: string, userId: string, eventId: string): Promise<RewardInfo[]>

Returns Promise<PendingRewards>

  • getRewardHistory(appId: string, userId: string, eventId: string): Promise<RewardInfo[]>
  • Returns list of user's reward history.

    Parameters

    • appId: string

      The ID of app.

      @@ -57,15 +57,15 @@

      The ID of the user who wants to check reward history.

    • eventId: string

      The ID of event to check reward history.

      -

    Returns Promise<RewardInfo[]>

  • getRewardTypeList(appId: string): Promise<RewardType[]>

Returns Promise<RewardInfo[]>

  • getRewardTypeList(appId: string): Promise<RewardType[]>
  • Returns a list of RewardTypes to use for events.

    Parameters

    • appId: string

      The ID of app.

      -

    Returns Promise<RewardType[]>

  • getTaskTypeList(appId: string): Promise<TaskType[]>

Returns Promise<RewardType[]>

  • getTaskTypeList(appId: string): Promise<TaskType[]>
  • Returns a list of TaskTypes to use for events.

    Parameters

    • appId: string

      The ID of app.

      -

    Returns Promise<TaskType[]>

  • reward(appId: string, userId: string, eventId: string, options?: RewardOptions): Promise<{ amount: number }>

Returns Promise<TaskType[]>

  • reward(appId: string, userId: string, eventId: string, options?: RewardOptions): Promise<{ amount: number }>
  • Provides event rewards to users.

    Parameters

    • appId: string

      The ID of app.

      @@ -75,7 +75,7 @@

      The ID of the event that the user participated in.

    • Optional options: RewardOptions

      The options of reward.

      -

    Returns Promise<{ amount: number }>

  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>

Returns Promise<{ amount: number }>

  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>
  • Sends request that include form to api server of AINFT Factory. Used to upload asset data.

    Parameters

    • method: POST | PUT
      @@ -87,7 +87,7 @@
      • [key: string]: string
    • fileFields: {}

      The file fields of form.

      • [key: string]: { buffer: Buffer; filename: string }
        • buffer: Buffer
        • filename: string

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • Sends request to api server of AINFT Factory. Authenticate by signing data.

    Parameters

    • method: HttpMethod
      @@ -97,7 +97,7 @@
    • Optional data: Record<string, any>

      The data to be included in the api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • Sends request to api server of AINFT Factory. Used when authentication is not required.

    Parameters

    • method: HttpMethod
      @@ -109,20 +109,20 @@
    • Optional headers: AxiosRequestHeaders

      The headers of Http api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • setBaseUrl(baseUrl: string): void
  • setBaseUrl(baseUrl: string): void
  • signData(data: any): string | Promise<string>

Returns void

  • signData(data: any): string | Promise<string>
  • Sign the data with the private key that the user has registered.

    Parameters

    • data: any

      The data to sign.

    Returns string | Promise<string>

    Returns signature string.

    -
  • Updates an event.

    Parameters

    Returns Promise<void>

Returns Promise<void>

  • signData(data: any): string | Promise<string>
  • Get AINFT object instance by ainftObjectId.

    Parameters

    • ainftObjectId: string

      The ID of AINFT object.

    Returns Promise<Ainft721Object>

    Returns the AINFT object corresponding to the given ID.

    import AinftJs from '@ainft-team/ainft-js';

    const ainftJs = new AinftJs('YOUR-PRIVATE-KEY');
    ainftJs.nft.get('YOUR-AINFT-OBJECT-ID')
    .then((res) => {
    const ainftObject = res;
    console.log(ainftObject.appId);
    })
    .catch((error) => {
    console.log(error);
    })
    -
  • Get AINFTs by user address.

    Parameters

    • address: string

      The ID of AINFT object.

      @@ -36,7 +36,7 @@

    Returns Promise<AinftTokenSearchResponse>

    Returns AINFTs.

    import AinftJs from '@ainft-team/ainft-js';

    const ainftJs = new AinftJs('YOUR-PRIVATE-KEY');
    ainftJs.nft.getAinftsByAccount('TOKEN-OWNER-ADDRESS')
    .then((res) => {
    const { nfts, isFinal, cursor } = res;
    console.log(nfts); // list of nft information.
    })
    .catch((error) => {
    console.log(error);
    })
    -
  • Get AINFTs by AINFT object id.

    Parameters

    • ainftObjectId: string

      The ID of AINFT object.

      @@ -47,28 +47,28 @@

    Returns Promise<AinftTokenSearchResponse>

    Returns AINFTs.

    import AinftJs from '@ainft-team/ainft-js';

    const ainftJs = new AinftJs('YOUR-PRIVATE-KEY');
    ainftJs.nft.getAinftsByAinftObject('YOUR-AINFT-OBJECT-ID', 5)
    .then((res) => {
    const { nfts, isFinal, cursor } = res;
    console.log(nfts); // list of nft information.
    })
    .catch((error) => {
    console.log(error);
    })
    -
  • register(ainftObjectId: string): Promise<void>
  • register(ainftObjectId: string): Promise<void>
  • Register AINFT object to factory server. If functions such as mint, transfer, or search do not work well after executing the create function, try executing this function.

    Parameters

    • ainftObjectId: string

      The ID of AINFT object.

      import AinftJs from '@ainft-team/ainft-js';

      const ainftJs = new AinftJs('YOUR-PRIVATE-KEY');
      ainftJs.nft.register('YOUR-AINFT-OBJECT-ID')
      .catch((error) => {
      console.log(error);
      })
      -

    Returns Promise<void>

Returns Promise<void>

  • Searches for AINFT objects created on the AIN Blockchain.

    Parameters

    Returns Promise<AinftObjectSearchResponse>

    Returns searched AINFT objects.

    import AinftJs from '@ainft-team/ainft-js';

    const ainftJs = new AinftJs('YOUR-PRIVATE-KEY');
    const params = {
    userAddress: '0x...',
    name: '...',
    symbol: '...',
    limit: 5,
    cursor: '...'
    }
    ainftJs.nft.searchAinftObjects(params)
    .then((res) => {
    const { ainftObjects, isFinal, cursor } = res;
    console.log(ainftObjects); // list of ainftObject information.
    })
    .catch((error) => {
    console.log(error);
    })
    -
  • Searches for AINFTs on the ain blockchain.

    Parameters

    Returns Promise<AinftTokenSearchResponse>

    Returns searched AINFTs

    import AinftJs from '@ainft-team/ainft-js';

    const ainftJs = new AinftJs('YOUR-PRIVATE-KEY');
    const params = {
    userAddress: '0x...',
    name: '...',
    symbol: '...',
    limit: 5,
    cursor: '...',
    tokenId: '...'
    }
    ainftJs.nft.searchNfts(params)
    .then((res) => {
    const { nfts, isFinal, cursor } = res;
    console.log(nfts); // list of nfts information.
    })
    .catch((error) => {
    console.log(error);
    })
    -
  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>
  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>
  • Sends request that include form to api server of AINFT Factory. Used to upload asset data.

    Parameters

    • method: POST | PUT
      @@ -80,7 +80,7 @@
      • [key: string]: string
    • fileFields: {}

      The file fields of form.

      • [key: string]: { buffer: Buffer; filename: string }
        • buffer: Buffer
        • filename: string

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • Sends request to api server of AINFT Factory. Authenticate by signing data.

    Parameters

    • method: HttpMethod
      @@ -90,7 +90,7 @@
    • Optional data: Record<string, any>

      The data to be included in the api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • Sends request to api server of AINFT Factory. Used when authentication is not required.

    Parameters

    • method: HttpMethod
      @@ -102,19 +102,19 @@
    • Optional headers: AxiosRequestHeaders

      The headers of Http api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • setBaseUrl(baseUrl: string): void
  • setBaseUrl(baseUrl: string): void
  • signData(data: any): string | Promise<string>

Returns void

  • signData(data: any): string | Promise<string>
  • Sign the data with the private key that the user has registered.

    Parameters

    • data: any

      The data to sign.

    Returns string | Promise<string>

    Returns signature string.

    -

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/personaModels.PersonaModels.html b/classes/personaModels.PersonaModels.html index 7f0fe8ec..e15a7b0d 100644 --- a/classes/personaModels.PersonaModels.html +++ b/classes/personaModels.PersonaModels.html @@ -1,12 +1,12 @@ PersonaModels | Ainft-Js
Options
All
  • Public
  • Public/Protected
  • All
Menu

This class supports creating persona models and managing it.
Do not create it directly; Get it from AinftJs instance.

-

Hierarchy

Index

Constructors

  • new PersonaModels(ain: default, baseUrl: string, route?: string): PersonaModels

Properties

ain: default
+

Hierarchy

Index

Constructors

  • new PersonaModels(ain: default, baseUrl: string, route?: string): PersonaModels

Properties

ain: default

The Ain object for sign and send transaction to AIN blockchain.

-
baseUrl: string = ''
+
baseUrl: string = ''

The base url of api server of AINFT Factory.

-
route: string
+
route: string

The subpath of api server request url.

-

Methods

  • chat(modelId: string, appId: string, userId: string, message: string, messageId?: string): Promise<ChatResponse>

Methods

  • chat(modelId: string, appId: string, userId: string, message: string, messageId?: string): Promise<ChatResponse>
  • Chats with your persona model.

    Parameters

    • modelId: string

      The ID of persona model.

      @@ -19,7 +19,7 @@
    • Optional messageId: string

      (Optional) The ID of message. If you want to manage the message ID separately, set it up.

    Returns Promise<ChatResponse>

    Returns response of persona model.

    -
  • create(appId: string, userId: string, modelName: string, coreBeliefs: string): Promise<CreatePersonaModelInfo>
  • create(appId: string, userId: string, modelName: string, coreBeliefs: string): Promise<CreatePersonaModelInfo>
  • Creates persona model.

    Parameters

    • appId: string

      The ID of app.

      @@ -30,14 +30,14 @@
    • coreBeliefs: string

      This is the central content of the persona model. The model reflects this with the highest priority.

    Returns Promise<CreatePersonaModelInfo>

    Returns the information of the persona model created.

    -
  • Gets credit info with connected persona model.

    Parameters

    • appId: string

      The ID of app.

    • modelId: string

      The ID of persona model.

    Returns Promise<null | PersonaModelCreditInfo>

    If set, returns credit and burn amount information.

    -
  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>
  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>
  • Sends request that include form to api server of AINFT Factory. Used to upload asset data.

    Parameters

    • method: POST | PUT
      @@ -49,7 +49,7 @@
      • [key: string]: string
    • fileFields: {}

      The file fields of form.

      • [key: string]: { buffer: Buffer; filename: string }
        • buffer: Buffer
        • filename: string

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • Sends request to api server of AINFT Factory. Authenticate by signing data.

    Parameters

    • method: HttpMethod
      @@ -59,7 +59,7 @@
    • Optional data: Record<string, any>

      The data to be included in the api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • Sends request to api server of AINFT Factory. Used when authentication is not required.

    Parameters

    • method: HttpMethod
      @@ -71,11 +71,11 @@
    • Optional headers: AxiosRequestHeaders

      The headers of Http api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • setBaseUrl(baseUrl: string): void
  • setBaseUrl(baseUrl: string): void
  • signData(data: any): string | Promise<string>

Returns void

  • signData(data: any): string | Promise<string>
  • deregisterItemFromAllStore(appId: string, type: string, subtype: string, value: string): Promise<void>
  • Deregisters an item from all stores.

    Parameters

    • appId: string

      The ID of the app.

      @@ -29,7 +29,7 @@

      The subtype of the item.

    • value: string

      The value of the item.

      -

    Returns Promise<void>

  • getAllItems(appId: string, type?: string, subtype?: string): Promise<Item[]>

Returns Promise<void>

  • getAllItems(appId: string, type?: string, subtype?: string): Promise<Item[]>
  • Returns a list of all items created in the app. If type/subtype is given, returns only items of the given type/subtype.

    Parameters

    • appId: string

      The ID of the app.

      @@ -38,33 +38,33 @@
    • Optional subtype: string

      The subtype of the items to fetch.

    Returns Promise<Item[]>

    List of items.

    -
  • Retrieves the usage history of all items of an app.

    Parameters

    Returns Promise<History<ItemHistory>>

    • A Promise that resolves to an object containing the usage history.
    -
  • Retrieves the purchase history of a specific item of an app.

    Parameters

    Returns Promise<History<PurchaseHistory>>

    A Promise that resolves to an object containing the purchase history of the item.

    -
  • Retrieves the usage history of a specific item of an app.

    Parameters

    Returns Promise<History<ItemHistory>>

    • A Promise that resolves to an object containing the usage history of the item.
    -
  • getStoreItemInfo(appId: string, storeId: string, itemName: string): Promise<StoreItem>
  • getStoreItemInfo(appId: string, storeId: string, itemName: string): Promise<StoreItem>
  • Returns information about a specific store item for a given app and store.

    Parameters

    • appId: string

      The ID of the app.

      @@ -73,28 +73,28 @@
    • itemName: string

      The name of the item to fetch.

    Returns Promise<StoreItem>

    Information about the store item.

    -
  • getStoreItemList(appId: string, storeId: string): Promise<StoreItem[]>
  • getStoreItemList(appId: string, storeId: string): Promise<StoreItem[]>
  • Returns a list of store items for a given app and store.

    Parameters

    • appId: string

      The ID of the app.

    • storeId: string

      The ID of the store.

    Returns Promise<StoreItem[]>

    List of store items.

    -
  • getUserInventory(appId: string, userId: string): Promise<UserItem[]>
  • getUserInventory(appId: string, userId: string): Promise<UserItem[]>
  • Returns a list of user items for a given app and user.

    Parameters

    • appId: string

      The ID of the app.

    • userId: string

      The ID of the user.

    Returns Promise<UserItem[]>

    List of user items.

    -
  • Retrieves the usage history of a specific user of an app.

    Parameters

    Returns Promise<History<ItemHistory>>

    • A Promise that resolves to an object containing the item usage history of the user.
    -
  • getUserItemInfo(appId: string, userId: string, itemName: string): Promise<UserItem>
  • getUserItemInfo(appId: string, userId: string, itemName: string): Promise<UserItem>
  • Returns information about a specific user item for a given app and user.

    Parameters

    • appId: string

      The ID of the app.

      @@ -103,14 +103,14 @@
    • itemName: string

      The name of the item to fetch.

    Returns Promise<UserItem>

    Information about the user item.

    -
  • Retrieves the purchase history of a specific user of an app.

    Parameters

    Returns Promise<History<PurchaseHistory>>

    • A Promise that resolves to an object containing the purchase history of the user.
    -
  • giveItemToUser(appId: string, userId: string, itemName: string, quantity: number, reason?: string): Promise<ItemGiveHistory>
  • giveItemToUser(appId: string, userId: string, itemName: string, quantity: number, reason?: string): Promise<ItemGiveHistory>
  • Gives item to user.

    Parameters

    • appId: string

      The ID of app.

      @@ -123,17 +123,17 @@
    • Optional reason: string

      The reason for giving an item. ex) Event for NFT holder

    Returns Promise<ItemGiveHistory>

    Returns information of item give history.

    -
  • Registers an item in the store for selling.

    Parameters

    Returns Promise<StoreItem>

    Returns item information registered in the store.

    -
  • resetNftTraitItem(appId: string, userId: string, chain: string, network: string, contractAddress: string, tokenId: string): Promise<NftMetadata>
  • resetNftTraitItem(appId: string, userId: string, chain: string, network: string, contractAddress: string, tokenId: string): Promise<NftMetadata>
  • Unequips all NFT traits currently worn on the NFT.

    Parameters

    • appId: string

      The ID of the app.

      @@ -150,7 +150,7 @@

    Returns Promise<NftMetadata>

    • A promise that returns the metadata of the NFT after unequip nft trait item.
    -
  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>
  • sendFormRequest(method: POST | PUT, trailingUrl: string, stringFields: {}, fileFields: {}): Promise<any>
  • Sends request that include form to api server of AINFT Factory. Used to upload asset data.

    Parameters

    • method: POST | PUT
      @@ -162,7 +162,7 @@
      • [key: string]: string
    • fileFields: {}

      The file fields of form.

      • [key: string]: { buffer: Buffer; filename: string }
        • buffer: Buffer
        • filename: string

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • sendRequest(method: HttpMethod, trailingUrl: string, data?: Record<string, any>): Promise<any>
  • Sends request to api server of AINFT Factory. Authenticate by signing data.

    Parameters

    • method: HttpMethod
      @@ -172,7 +172,7 @@
    • Optional data: Record<string, any>

      The data to be included in the api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • sendRequestWithoutSign(method: HttpMethod, trailingUrl: string, data?: Record<string, any>, headers?: AxiosRequestHeaders): Promise<any>
  • Sends request to api server of AINFT Factory. Used when authentication is not required.

    Parameters

    • method: HttpMethod
      @@ -184,23 +184,23 @@
    • Optional headers: AxiosRequestHeaders

      The headers of Http api request.

    Returns Promise<any>

    Returns response of api request.

    -
  • setBaseUrl(baseUrl: string): void
  • setBaseUrl(baseUrl: string): void
  • signData(data: any): string | Promise<string>

Returns void

  • signData(data: any): string | Promise<string>
  • Sign the data with the private key that the user has registered.

    Parameters

    • data: any

      The data to sign.

    Returns string | Promise<string>

    Returns signature string.

    -
  • tryOnItem(ItemTryOnParams: ItemTryOnParams): Promise<{ image: string; isOccupied: boolean }>
  • tryOnItem(ItemTryOnParams: ItemTryOnParams): Promise<{ image: string; isOccupied: boolean }>
  • Tries on store item to own NFT

    Parameters

    Returns Promise<{ image: string; isOccupied: boolean }>

    } - A promise that returns an object containing the image and whether the item is occupied or not.

    -
  • unequipNftTraitItem(appId: string, userId: string, itemName: string, chain: string, network: string, contractAddress: string, tokenId: string): Promise<NftMetadata>
  • unequipNftTraitItem(appId: string, userId: string, itemName: string, chain: string, network: string, contractAddress: string, tokenId: string): Promise<NftMetadata>
  • Unequips an NFT trait item that is being worn on the NFT. When unworn, it will be restored to its original NFT attribute.

    Parameters

    • appId: string

      The ID of the app.

      @@ -219,15 +219,15 @@

    Returns Promise<NftMetadata>

    • A promise that returns the metadata of the NFT after unequip nft trait item.
    -
  • Updates an item.

    Parameters

    Returns Promise<void>

Returns Promise<void>

Returns Promise<void>

  • signData(data: any): string | Promise<string>