mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
Merge pull request #333 from CosmWasm/rm-SigningCallback
Cleanup some types
This commit is contained in:
commit
5cf59a4380
@ -13,6 +13,8 @@
|
||||
- @cosmjs/cosmwasm: `ContractDetails` was removed in favour of just `Contract`.
|
||||
The missing `init_msg` is now available via the contract's code history (see
|
||||
`getContractCodeHistory`).
|
||||
- @cosmjs/cosmwasm: Remove `SigningCallback` in favour of the `OfflineSigner`
|
||||
interface.
|
||||
- @cosmjs/sdk38: Rename `CosmosClient.getNonce` method to `.getSequence`.
|
||||
- @cosmjs/sdk38: Remove `RestClient` class in favour of new modular `LcdClient`
|
||||
class.
|
||||
@ -37,3 +39,6 @@
|
||||
words.
|
||||
- @cosmjs/sdk38: The new `Secp256k1Wallet.serialize` and `.deserialize` allow
|
||||
encrypted serialization of the wallet.
|
||||
- @cosmjs/sdk38: Remove the obsolete `upload`, `init`, `exec` properties from
|
||||
`FeeTable`. @cosmjs/cosmwasm has its own `FeeTable` with those properties.
|
||||
- @cosmjs/sdk38: Rename package to @cosmjs/launchpad.
|
||||
|
@ -52,7 +52,6 @@ export function main(originalArgs: readonly string[]): void {
|
||||
"ExecuteResult",
|
||||
"FeeTable",
|
||||
"InstantiateResult",
|
||||
"SigningCallback",
|
||||
"SigningCosmWasmClient",
|
||||
"UploadMeta",
|
||||
"UploadResult",
|
||||
|
@ -25,7 +25,6 @@ export {
|
||||
InstantiateOptions,
|
||||
InstantiateResult,
|
||||
MigrateResult,
|
||||
SigningCallback,
|
||||
SigningCosmWasmClient,
|
||||
UploadMeta,
|
||||
UploadResult,
|
||||
|
@ -13,7 +13,6 @@ import {
|
||||
PostTxFailure,
|
||||
PostTxResult,
|
||||
StdFee,
|
||||
StdSignature,
|
||||
StdTx,
|
||||
} from "@cosmjs/launchpad";
|
||||
import { Uint53 } from "@cosmjs/math";
|
||||
@ -31,10 +30,9 @@ import {
|
||||
MsgUpdateAdmin,
|
||||
} from "./msgs";
|
||||
|
||||
export interface SigningCallback {
|
||||
(signBytes: Uint8Array): Promise<StdSignature>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Those fees are used by the higher level methods of SigningCosmWasmClient
|
||||
*/
|
||||
export interface FeeTable {
|
||||
readonly upload: StdFee;
|
||||
readonly init: StdFee;
|
||||
|
1
packages/cosmwasm/types/index.d.ts
vendored
1
packages/cosmwasm/types/index.d.ts
vendored
@ -24,7 +24,6 @@ export {
|
||||
InstantiateOptions,
|
||||
InstantiateResult,
|
||||
MigrateResult,
|
||||
SigningCallback,
|
||||
SigningCosmWasmClient,
|
||||
UploadMeta,
|
||||
UploadResult,
|
||||
|
@ -1,17 +1,9 @@
|
||||
import {
|
||||
BroadcastMode,
|
||||
Coin,
|
||||
Msg,
|
||||
OfflineSigner,
|
||||
PostTxResult,
|
||||
StdFee,
|
||||
StdSignature,
|
||||
} from "@cosmjs/launchpad";
|
||||
import { BroadcastMode, Coin, Msg, OfflineSigner, PostTxResult, StdFee } from "@cosmjs/launchpad";
|
||||
import { Account, CosmWasmClient, GetSequenceResult } from "./cosmwasmclient";
|
||||
import { Log } from "./logs";
|
||||
export interface SigningCallback {
|
||||
(signBytes: Uint8Array): Promise<StdSignature>;
|
||||
}
|
||||
/**
|
||||
* Those fees are used by the higher level methods of SigningCosmWasmClient
|
||||
*/
|
||||
export interface FeeTable {
|
||||
readonly upload: StdFee;
|
||||
readonly init: StdFee;
|
||||
|
@ -7,26 +7,14 @@ import { Msg, MsgSend } from "./msgs";
|
||||
import { StdFee, StdTx } from "./types";
|
||||
import { OfflineSigner } from "./wallet";
|
||||
|
||||
/**
|
||||
* Those fees are used by the higher level methods of SigningCosmosClient
|
||||
*/
|
||||
export interface FeeTable {
|
||||
readonly upload: StdFee;
|
||||
readonly init: StdFee;
|
||||
readonly exec: StdFee;
|
||||
readonly send: StdFee;
|
||||
}
|
||||
|
||||
const defaultFees: FeeTable = {
|
||||
upload: {
|
||||
amount: coins(25000, "ucosm"),
|
||||
gas: "1000000", // one million
|
||||
},
|
||||
init: {
|
||||
amount: coins(12500, "ucosm"),
|
||||
gas: "500000", // 500k
|
||||
},
|
||||
exec: {
|
||||
amount: coins(5000, "ucosm"),
|
||||
gas: "200000", // 200k
|
||||
},
|
||||
send: {
|
||||
amount: coins(2000, "ucosm"),
|
||||
gas: "80000", // 80k
|
||||
|
@ -4,10 +4,10 @@ import { BroadcastMode } from "./lcdapi";
|
||||
import { Msg } from "./msgs";
|
||||
import { StdFee } from "./types";
|
||||
import { OfflineSigner } from "./wallet";
|
||||
/**
|
||||
* Those fees are used by the higher level methods of SigningCosmosClient
|
||||
*/
|
||||
export interface FeeTable {
|
||||
readonly upload: StdFee;
|
||||
readonly init: StdFee;
|
||||
readonly exec: StdFee;
|
||||
readonly send: StdFee;
|
||||
}
|
||||
export declare class SigningCosmosClient extends CosmosClient {
|
||||
|
Loading…
x
Reference in New Issue
Block a user