• Recreates a Query from a Base64-encoded string. First decodes the string to a buffer, then passes to Query.fromBytes. For greater flexibility, this function uses the base Query class, but takes an optional type parameter if the type of query is known, allowing stronger typeing.

    Type Parameters

    • Q extends default<any>

    Parameters

    • bytesString: string

      Base64-encoded string

    Returns Q

    Query<T>

    Example

    const query1 = base64StringToQuery(bytesString)
    const query2 = base64StringToQuery<AccountInfoQuery>(bytesString)
    // query1 type: Query<any>
    // query2 type: AccountInfoQuery

Generated using TypeDoc