How to use the @tanker/identity.createUserSecretBinary function in @tanker/identity

To help you get started, we’ve selected a few @tanker/identity examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TankerHQ / sdk-js / packages / core / src / __tests__ / KeySafe.spec.js View on Github external
beforeEach(() => {
    secret = createUserSecretBinary('trustchainid', 'user-id');
    safe = generateKeySafe();
  });
github TankerHQ / sdk-js / packages / core / src / Groups / __tests__ / GroupStore.spec.js View on Github external
beforeEach(async () => {
    dbName = `groupStore-test-${makePrefix()}`;
    userSecret = createUserSecretBinary('trustchainid', 'Merkle–Damgård');
    groupStoreConfig = { dbName, ...dataStoreConfig, schemas: GroupStore.schemas };
    datastore = await openDataStore(groupStoreConfig);
    groupStore = await GroupStore.open(datastore, userSecret);
  });
github TankerHQ / sdk-js / packages / core / src / __tests__ / GroupStoreBuilder.js View on Github external
static async open() {
    const { generator } = await makeGenerator();
    const dataStore = await makeMemoryDataStore();
    const userSecret = createUserSecretBinary('trustchainid', 'userId');
    const groupStore = await GroupStore.open(dataStore, userSecret);

    return new GroupStoreBuilder(groupStore, generator);
  }
github TankerHQ / sdk-js / packages / core / src / LocalUser / __tests__ / KeyStore.spec.js View on Github external
beforeEach(async () => {
    dbName = `keystore-test-${makePrefix()}`;
    keystoreConfig = { ...dataStoreConfig, dbName, schemas };
    datastore = await openDataStore(keystoreConfig);
    secret = createUserSecretBinary('trustchainid', 'bob');
  });
github TankerHQ / sdk-js / packages / core / src / __tests__ / ResourceStore.spec.js View on Github external
beforeEach(async () => {
    dbName = `sharedKeystore-test-${makePrefix()}`;
    userSecret = createUserSecretBinary('trustchainid', 'Merkle–Damgård');
    sharedKeystoreConfig = { dbName, ...dataStoreConfig, schemas: SharedKeystore.schemas };
    datastore = await openDataStore(sharedKeystoreConfig);
    sharedKeystore = await SharedKeystore.open(datastore, userSecret);
  });