proto-signing: Use cosmjs-types
This commit is contained in:
parent
795b5d50d7
commit
b843b0b751
@ -1,4 +1,4 @@
|
||||
import { AuthInfo, TxBody, TxRaw } from "./codec/cosmos/tx/v1beta1/tx";
|
||||
import { AuthInfo, TxBody, TxRaw } from "cosmjs-types/cosmos/tx/v1beta1/tx";
|
||||
|
||||
export interface DecodedTxRaw {
|
||||
readonly authInfo: AuthInfo;
|
||||
|
||||
@ -14,8 +14,8 @@ import {
|
||||
} from "@cosmjs/crypto";
|
||||
import { Bech32, fromBase64, fromUtf8, toBase64, toUtf8 } from "@cosmjs/encoding";
|
||||
import { assert, isNonNullObject } from "@cosmjs/utils/build";
|
||||
import { SignDoc } from "cosmjs-types/cosmos/tx/v1beta1/tx";
|
||||
|
||||
import { SignDoc } from "./codec/cosmos/tx/v1beta1/tx";
|
||||
import { AccountData, DirectSignResponse, OfflineDirectSigner } from "./signer";
|
||||
import { makeSignBytes } from "./signing";
|
||||
import {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { encodeSecp256k1Signature, rawSecp256k1PubkeyToRawAddress } from "@cosmjs/amino";
|
||||
import { Secp256k1, sha256 } from "@cosmjs/crypto";
|
||||
import { Bech32 } from "@cosmjs/encoding";
|
||||
import { SignDoc } from "cosmjs-types/cosmos/tx/v1beta1/tx";
|
||||
|
||||
import { SignDoc } from "./codec/cosmos/tx/v1beta1/tx";
|
||||
import { AccountData, DirectSignResponse, OfflineDirectSigner } from "./signer";
|
||||
import { makeSignBytes } from "./signing";
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { fromBase64 } from "@cosmjs/encoding";
|
||||
import { Any } from "cosmjs-types/google/protobuf/any";
|
||||
|
||||
import { Any } from "./codec/google/protobuf/any";
|
||||
import { decodePubkey, encodePubkey } from "./pubkey";
|
||||
|
||||
describe("pubkey", () => {
|
||||
|
||||
@ -9,10 +9,9 @@ import {
|
||||
} from "@cosmjs/amino";
|
||||
import { fromBase64 } from "@cosmjs/encoding";
|
||||
import { Uint53 } from "@cosmjs/math";
|
||||
|
||||
import { LegacyAminoPubKey } from "./codec/cosmos/crypto/multisig/keys";
|
||||
import { PubKey } from "./codec/cosmos/crypto/secp256k1/keys";
|
||||
import { Any } from "./codec/google/protobuf/any";
|
||||
import { LegacyAminoPubKey } from "cosmjs-types/cosmos/crypto/multisig/keys";
|
||||
import { PubKey } from "cosmjs-types/cosmos/crypto/secp256k1/keys";
|
||||
import { Any } from "cosmjs-types/google/protobuf/any";
|
||||
|
||||
export function encodePubkey(pubkey: Pubkey): Any {
|
||||
if (isSecp256k1Pubkey(pubkey)) {
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { fromHex } from "@cosmjs/encoding";
|
||||
import { assert } from "@cosmjs/utils";
|
||||
import { MsgSend as IMsgSend } from "cosmjs-types/cosmos/bank/v1beta1/tx";
|
||||
import { TxBody } from "cosmjs-types/cosmos/tx/v1beta1/tx";
|
||||
import { Any } from "cosmjs-types/google/protobuf/any";
|
||||
import Long from "long";
|
||||
import { Field, Type } from "protobufjs";
|
||||
|
||||
import { MsgSend as IMsgSend } from "./codec/cosmos/bank/v1beta1/tx";
|
||||
import { TxBody } from "./codec/cosmos/tx/v1beta1/tx";
|
||||
import { Any } from "./codec/google/protobuf/any";
|
||||
import { isPbjsGeneratedType, isTsProtoGeneratedType, Registry } from "./registry";
|
||||
|
||||
describe("registry demo", () => {
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { MsgSend } from "cosmjs-types/cosmos/bank/v1beta1/tx";
|
||||
import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
|
||||
import { TxBody } from "cosmjs-types/cosmos/tx/v1beta1/tx";
|
||||
import { Any } from "cosmjs-types/google/protobuf/any";
|
||||
import Long from "long";
|
||||
import protobuf from "protobufjs";
|
||||
|
||||
import { MsgSend } from "./codec/cosmos/bank/v1beta1/tx";
|
||||
import { Coin } from "./codec/cosmos/base/v1beta1/coin";
|
||||
import { TxBody } from "./codec/cosmos/tx/v1beta1/tx";
|
||||
import { Any } from "./codec/google/protobuf/any";
|
||||
|
||||
/**
|
||||
* A type generated by [ts-proto](https://github.com/stephenh/ts-proto).
|
||||
*/
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import { OfflineAminoSigner, StdSignature } from "@cosmjs/amino";
|
||||
|
||||
import { SignDoc } from "./codec/cosmos/tx/v1beta1/tx";
|
||||
import { SignDoc } from "cosmjs-types/cosmos/tx/v1beta1/tx";
|
||||
|
||||
/**
|
||||
* This is the same as Algo from @cosmjs/launchpad but those might diverge in the future.
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { fromBase64, fromHex, toHex } from "@cosmjs/encoding";
|
||||
import { SignMode } from "cosmjs-types/cosmos/tx/signing/v1beta1/signing";
|
||||
import { TxRaw } from "cosmjs-types/cosmos/tx/v1beta1/tx";
|
||||
|
||||
import { SignMode } from "./codec/cosmos/tx/signing/v1beta1/signing";
|
||||
import { TxRaw } from "./codec/cosmos/tx/v1beta1/tx";
|
||||
import { decodeTxRaw } from "./decode";
|
||||
import { DirectSecp256k1HdWallet } from "./directsecp256k1hdwallet";
|
||||
import { Registry } from "./registry";
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
|
||||
import { SignMode } from "cosmjs-types/cosmos/tx/signing/v1beta1/signing";
|
||||
import { AuthInfo, SignDoc, SignerInfo } from "cosmjs-types/cosmos/tx/v1beta1/tx";
|
||||
import { Any } from "cosmjs-types/google/protobuf/any";
|
||||
import Long from "long";
|
||||
|
||||
import { Coin } from "./codec/cosmos/base/v1beta1/coin";
|
||||
import { SignMode } from "./codec/cosmos/tx/signing/v1beta1/signing";
|
||||
import { AuthInfo, SignDoc, SignerInfo } from "./codec/cosmos/tx/v1beta1/tx";
|
||||
import { Any } from "./codec/google/protobuf/any";
|
||||
|
||||
/**
|
||||
* Creates and serializes an AuthInfo document using SIGN_MODE_DIRECT.
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user