Skip to content

Commit

Permalink
Merge pull request #656 from cosmology-tech/change-decimal-flag-name
Browse files Browse the repository at this point in the history
change flag name
  • Loading branch information
Zetazzz authored Oct 17, 2024
2 parents 557e0cb + c39d7f7 commit 09d9492
Show file tree
Hide file tree
Showing 48 changed files with 1,541 additions and 17 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,17 @@ The following blockchain libraries (generated by Telescope) are available via np
- [Generate](#generate)
- [Add Protobufs](#add-protobufs)
- [Transpile](#transpile)
- [Transpile with CLI](#transpile-with-cli)
- [Build](#build)
- [Publishing](#publishing)
- [Usage](#usage)
- [Programatic Usage](#programatic-usage)
- [Options](#options)
- [Amino Encoding](#amino-encoding)
- [Implemented Interface Options](#implemented-interface-options)
- [Prototypes Options](#prototypes-options)
- [Prototypes Methods](#prototypes-methods)
- [Enums Methods](#enums-options)
- [Enums Options](#enums-options)
- [LCD Client Options](#lcd-client-options)
- [RPC Client Options](#rpc-client-options)
- [Stargate Client Options](#stargate-client-options)
Expand Down Expand Up @@ -415,7 +418,7 @@ See [RPC Clients](#rpc-clients) for more info.
| option | description | defaults |
| ----------------------------------------- | -------------------------------------------------------------- | --------- |
| `prototypes.typingsFormat.customTypes.useCosmosSDKDec` | enable handling "prototypes.typingsFormat.customTypes.useCosmosSDKDec" proto custom type. Used to show decimal fields with the custom type correctly. Highly recommend set to true. | `true` |
| `prototypes.typingsFormat.customTypes.usePatchedDecimal` | To use patched decimal other then decimal from @cosmjs/math | `false` |
| `prototypes.typingsFormat.customTypes.useEnhancedDecimal` | To use patched decimal other then decimal from @cosmjs/math | `false` |
| `prototypes.typingsFormat.customTypes.base64Lib` | To use endo/base64 methods | `undefined` |
| `prototypes.typingsFormat.num64` | 'long' or 'bigint', the way of generating int64 proto types, set to 'bigint' to enable using more stable built-in type | `bigint` |
| `prototypes.typingsFormat.useTelescopeGeneratedType` | Discard GeneratedType from cosmjs, use TelescopeGeneratedType instead inside *.registry.ts files | `false` |
Expand Down Expand Up @@ -1138,7 +1141,7 @@ Checkout these related projects:

## Credits

🛠 Built by Cosmology — if you like our tools, please consider delegating to [our validator ⚛️](https://cosmology.zone/validator)
🛠 Built by Cosmology — if you like our tools, please consider delegating to [our validator ⚛️](https://cosmology.zone/validator)

Thanks to these engineers, teams and projects for inspiring Telescope:

Expand All @@ -1154,3 +1157,4 @@ Thanks to these engineers, teams and projects for inspiring Telescope:
AS DESCRIBED IN THE TELESCOPE LICENSES, THE SOFTWARE IS PROVIDED “AS IS”, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.

No developer or entity involved in creating Telescope will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the Telescope code or Telescope CLI, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/


// START agoric-sdk patch
// The largest value we need is 18 (Ether).
const maxFractionalDigits = 30;
/**
Expand Down Expand Up @@ -112,4 +111,3 @@ export class Decimal {
}
}
}
// END agoric-sdk patch
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
130 changes: 130 additions & 0 deletions __fixtures__/v-next/outputhelperfunc/binary.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
export declare enum WireType {
Varint = 0,
Fixed64 = 1,
Bytes = 2,
Fixed32 = 5
}
export interface IBinaryReader {
buf: Uint8Array;
pos: number;
type: number;
len: number;
tag(): [number, WireType, number];
skip(length?: number): this;
skipType(wireType: number): this;
uint32(): number;
int32(): number;
sint32(): number;
fixed32(): number;
sfixed32(): number;
int64(): bigint;
uint64(): bigint;
sint64(): bigint;
fixed64(): bigint;
sfixed64(): bigint;
float(): number;
double(): number;
bool(): boolean;
bytes(): Uint8Array;
string(): string;
}
export declare class BinaryReader implements IBinaryReader {
buf: Uint8Array;
pos: number;
type: number;
len: number;
assertBounds(): void;
constructor(buf?: ArrayLike<number>);
tag(): [number, WireType, number];
skip(length?: number): this;
skipType(wireType: number): this;
uint32(): number;
int32(): number;
sint32(): number;
fixed32(): number;
sfixed32(): number;
int64(): bigint;
uint64(): bigint;
sint64(): bigint;
fixed64(): bigint;
sfixed64(): bigint;
float(): number;
double(): number;
bool(): boolean;
bytes(): Uint8Array;
string(): string;
}
export interface IBinaryWriter {
len: number;
head: IOp;
tail: IOp;
states: State | null;
finish(): Uint8Array;
fork(): IBinaryWriter;
reset(): IBinaryWriter;
ldelim(): IBinaryWriter;
tag(fieldNo: number, type: WireType): IBinaryWriter;
uint32(value: number): IBinaryWriter;
int32(value: number): IBinaryWriter;
sint32(value: number): IBinaryWriter;
int64(value: string | number | bigint): IBinaryWriter;
uint64: (value: string | number | bigint) => IBinaryWriter;
sint64(value: string | number | bigint): IBinaryWriter;
fixed64(value: string | number | bigint): IBinaryWriter;
sfixed64: (value: string | number | bigint) => IBinaryWriter;
bool(value: boolean): IBinaryWriter;
fixed32(value: number): IBinaryWriter;
sfixed32: (value: number) => IBinaryWriter;
float(value: number): IBinaryWriter;
double(value: number): IBinaryWriter;
bytes(value: Uint8Array): IBinaryWriter;
string(value: string): IBinaryWriter;
}
interface IOp {
len: number;
next?: IOp;
proceed(buf: Uint8Array | number[], pos: number): void;
}
declare class State {
head: IOp;
tail: IOp;
len: number;
next: State | null;
constructor(writer: BinaryWriter);
}
export declare class BinaryWriter implements IBinaryWriter {
len: number;
head: IOp;
tail: IOp;
states: State | null;
constructor();
static create(): BinaryWriter;
static alloc(size: number): Uint8Array | number[];
private _push;
finish(): Uint8Array;
fork(): BinaryWriter;
reset(): BinaryWriter;
ldelim(): BinaryWriter;
tag(fieldNo: number, type: WireType): BinaryWriter;
uint32(value: number): BinaryWriter;
int32(value: number): BinaryWriter;
sint32(value: number): BinaryWriter;
int64(value: string | number | bigint): BinaryWriter;
uint64: (value: string | number | bigint) => BinaryWriter;
sint64(value: string | number | bigint): BinaryWriter;
fixed64(value: string | number | bigint): BinaryWriter;
sfixed64: (value: string | number | bigint) => BinaryWriter;
bool(value: boolean): BinaryWriter;
fixed32(value: number): BinaryWriter;
sfixed32: (value: number) => BinaryWriter;
float(value: number): BinaryWriter;
double(value: number): BinaryWriter;
bytes(value: Uint8Array): BinaryWriter;
string(value: string): BinaryWriter;
}
export {};
Loading

0 comments on commit 09d9492

Please sign in to comment.