Add Custom Histories To SRRs

To know the methods calling to Startrail API from Startrail-Sdk-Js

addCustomHistoriesToSRRs()

Add(Associate) custom history ids to SRRs

Method parameters

VariableTypeDescription

startrailLUWContractAddress

string

The address of LicensedUserWallet(LUW) contract. Sets it when you want to execute transaction by the LUW contract address

contractAddress

string

The address of collection contract. Sets it when you want to associate collection contract address with the SRR.

tokenIds

string[]

Startrail Registry Record Token IDs

customHistoryIds

string[]

Custom History IDs

Parameters Example

await sdk.addCustomHistoriesToSRRs(
  {
    startrailLUWContractAddress: '0x572a9e6B66F56A0D2c5cBE13066A4662b9C07868',
    tokenIds: ['556527153239', '832736095995'],
    customHistoryIds: ['12', '13']
  }
)

Returns

Promise will be returned which resolves with a Response object upon a successful confirmation. false will be returned when user flow is cancelled in such a case that a user closes the popup modal.

If the confirmation fails, the Promise will resolve with an {error} object that describes the failure.

Promise<Response | false>

The use of "txReceiptId" will soon be deprecated and removed.

Response

VariableTypeDescription

txReceiptId

string

ID to identify transaction details in Startrail-API DB.

Error

Custom Error objects. Refer to the Error Catalogue for possible data.

Response Example

Example

{
  txReceiptId: 0
}

Last updated

©2023 Startbahn, Inc.