How to use the bytebuffer.fromUTF8 function in bytebuffer

To help you get started, we’ve selected a few bytebuffer 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 lino-network / lino-js / src / query / keys.ts View on Github external
export function getAccountMetaKey(accKey: string): string {
    const accKeyHex = ByteBuffer.fromUTF8(accKey).toHex();
    return _KEYS.accountMetaSubstore.concat(accKeyHex);
  }
github lino-network / lino-js / lib / lino-js.esm.js View on Github external
function getPostReportOrUpvoteKey(permlink, user) {
        const userHex = ByteBuffer.fromUTF8(user).toHex();
        return getPostReportOrUpvotePrefix(permlink).concat(userHex);
    }
    Keys.getPostReportOrUpvoteKey = getPostReportOrUpvoteKey;
github lino-network / lino-js / src / query / keys.ts View on Github external
export function getPostCommentPrefix(permlink: string): string {
    const permlinkHex = ByteBuffer.fromUTF8(permlink).toHex();
    return _KEYS.postCommentSubStore.concat(permlinkHex).concat(_KEYS.sep);
  }
github lino-network / lino-js / src / query / keys.ts View on Github external
export function getLinoStakeStatKey(day: string): string {
    const dayHex = ByteBuffer.fromUTF8(day).toHex();
    return _KEYS.linoStakeStatSubStore.concat(dayHex);
  }
github lino-network / lino-js / src / query / keys.ts View on Github external
export function getValidatorKey(accKey: string): string {
    const accKeyHex = ByteBuffer.fromUTF8(accKey).toHex();
    return _KEYS.validatorSubstore.concat(accKeyHex);
  }
github lino-network / lino-js / src / query / keys.ts View on Github external
export function getDelegateeKey(me: string, myDelegatee: string): string {
    const myDelegateeHex = ByteBuffer.fromUTF8(myDelegatee).toHex();
    return getDelegateePrefix(me).concat(myDelegateeHex);
  }
github lino-network / lino-js / lib / lino-js.esm.js View on Github external
function getExpiredProposalKey(proposalID) {
        const proposalIDHex = ByteBuffer.fromUTF8(proposalID).toHex();
        return _KEYS.expiredProposalSubStore.concat(proposalIDHex);
    }
    Keys.getExpiredProposalKey = getExpiredProposalKey;
github lino-network / lino-js / src / query / keys.ts View on Github external
export function getPendingCoinDayQueueKey(me: string): string {
    const meHex = ByteBuffer.fromUTF8(me).toHex();
    return _KEYS.accountPendingCoinDayQueueSubstore.concat(meHex).concat(_KEYS.sep);
  }
github lino-network / lino-js / src / query / keys.ts View on Github external
export function getPostInfoKey(permlink: string): string {
    const permlinkHex = ByteBuffer.fromUTF8(permlink).toHex();
    return _KEYS.postInfoSubStore.concat(permlinkHex);
  }
github cockroachdb / cockroach-gen / ui / app / redux / uiData.spec.ts View on Github external
let setValue = function(key: string, obj: Object) {
            let value = new protos.cockroach.server.serverpb.GetUIDataResponse.Value();
            value.setValue(ByteBuffer.fromUTF8(JSON.stringify(obj)));
            response.key_values.set(key, value);
          };
          setValue(uiKey1, uiObj1);