Vault

create(name, options)

  • name (string, required) - new vault name

  • options (VaultCreateOptions, optional) - public/private, terms of access, etc.

  • returns Promise<{ vaultId, membershipId, transactionId }> - Promise with new vault id, owner membership id & corresponding transaction id

example
// create a private vault
const { vaultId, membershipId } = await akord.vault.create("my first private vault");

// create a public vault with terms of access
const { vaultId, membershipId } = await akord.vault.create(
  "my first public vault",
  { public: true, termsOfAccess: "terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault" }
);

rename(vaultId, name)

  • vaultId (string, required)

  • name (string, required) - new vault name

  • returns Promise<{ transactionId }> - Promise with corresponding transaction id

example
const { transactionId } = await akord.vault.rename(vaultId, "updated name");

archive(vaultId)

  • vaultId (string, required)

  • returns Promise<{ transactionId }> - Promise with corresponding transaction id

example

restore(vaultId)

  • vaultId (string, required)

  • returns Promise<{ transactionId }> - Promise with corresponding transaction id

example

delete(vaultId)

  • vaultId (string, required)

  • returns Promise<{ transactionId }> - Promise with corresponding transaction id

example

get(vaultId, options)

  • vaultId (string, required)

  • options (VaultGetOptions, optional)

  • returns Promise<Vault> - Promise with the vault object

example

listAll(options)

  • options (ListOptions, optional)

  • returns Promise<Array<Vault>> - Promise with currently authenticated user vaults

example

list(listOptions)

  • options (ListOptions, optional)

  • returns Promise<{ items, nextToken }> - Promise with paginated user vaults

example

Last updated

Was this helpful?