Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function deploy(url: string, identity: ExplorerIdentity, metadata: any, contentFiles: Map) {
// Build entity and group all files
const preparationData = await DeploymentBuilder.buildEntity(
EntityType.PROFILE,
[identity.address],
contentFiles,
metadata
)
// sign the entity id fetchMetaContentServer
const authChain = Authenticator.signPayload(identity, preparationData.entityId)
// Build the client
const catalyst = new ContentClient(url, 'explorer-kernel-profile')
// Build the deploy data
const deployData: DeploymentData = { ...preparationData, authChain }
// Deploy the actual entity
return catalyst.deployEntity(deployData)
}
async function deploy(url: string, identity: ExplorerIdentity, metadata: any, contentFiles: Map) {
// Build entity and group all files
const preparationData = await DeploymentBuilder.buildEntity(
EntityType.PROFILE,
[identity.address],
contentFiles,
metadata
)
// sign the entity id fetchMetaContentServer
const authChain = Authenticator.signPayload(identity, preparationData.entityId)
// Build the client
const catalyst = new ContentClient(url, 'explorer-kernel-profile')
// Build the deploy data
const deployData: DeploymentData = { ...preparationData, authChain }
// Deploy the actual entity
return catalyst.deployEntity(deployData)
}
constructor(
public options: {
contentServer: string
metaContentServer: string
metaContentService: string
contentServerBundles: string
tutorialBaseURL: string
}
) {
this.catalyst = new CatalystClient(options.metaContentServer, 'EXPLORER')
}