Merge pull request #722 from cosmos/657-independent-stargate-2
Reorganise Amino signature functions/type
This commit is contained in:
commit
e617272004
@ -19,3 +19,4 @@ export {
|
||||
pubkeyType,
|
||||
} from "./pubkeys";
|
||||
export { createMultisigThresholdPubkey } from "./multisig";
|
||||
export { decodeSignature, encodeSecp256k1Signature, StdSignature } from "./signature";
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { fromBase64 } from "@cosmjs/encoding";
|
||||
|
||||
import { decodeSignature, encodeSecp256k1Signature } from "./signature";
|
||||
import { StdSignature } from "./types";
|
||||
import { decodeSignature, encodeSecp256k1Signature, StdSignature } from "./signature";
|
||||
|
||||
describe("signature", () => {
|
||||
describe("encodeSecp256k1Signature", () => {
|
||||
@ -1,8 +1,13 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { encodeSecp256k1Pubkey, pubkeyType } from "@cosmjs/amino";
|
||||
import { fromBase64, toBase64 } from "@cosmjs/encoding";
|
||||
|
||||
import { StdSignature } from "./types";
|
||||
import { encodeSecp256k1Pubkey } from "./encoding";
|
||||
import { Pubkey, pubkeyType } from "./pubkeys";
|
||||
|
||||
export interface StdSignature {
|
||||
readonly pub_key: Pubkey;
|
||||
readonly signature: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes a binary pubkey and signature to create a signature object
|
||||
@ -2,11 +2,14 @@
|
||||
export {
|
||||
decodeAminoPubkey,
|
||||
decodeBech32Pubkey,
|
||||
decodeSignature,
|
||||
encodeAminoPubkey,
|
||||
encodeBech32Pubkey,
|
||||
encodeSecp256k1Pubkey,
|
||||
encodeSecp256k1Signature,
|
||||
pubkeyToAddress,
|
||||
pubkeyType,
|
||||
StdSignature,
|
||||
} from "@cosmjs/amino";
|
||||
import { SinglePubkey } from "@cosmjs/amino";
|
||||
/** @deprecated PubKey is deprecated. Use `SinglePubkey` or the more general `Pubkey` from `@cosmjs/amino`. */
|
||||
@ -139,11 +142,10 @@ export {
|
||||
} from "./msgs";
|
||||
export { makeCosmoshubPath } from "./paths";
|
||||
export { findSequenceForSignedTx } from "./sequence";
|
||||
export { encodeSecp256k1Signature, decodeSignature } from "./signature";
|
||||
export { AccountData, Algo, AminoSignResponse, OfflineSigner } from "./signer";
|
||||
export { CosmosFeeTable, SigningCosmosClient } from "./signingcosmosclient";
|
||||
export { isStdTx, isWrappedStdTx, makeStdTx, CosmosSdkTx, StdTx, WrappedStdTx, WrappedTx } from "./tx";
|
||||
export { StdFee, StdSignature } from "./types";
|
||||
export { StdFee } from "./types";
|
||||
export { executeKdf, KdfConfiguration } from "./wallet";
|
||||
export { extractKdfConfiguration, Secp256k1HdWallet } from "./secp256k1hdwallet";
|
||||
export { Secp256k1Wallet } from "./secp256k1wallet";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { rawSecp256k1PubkeyToRawAddress } from "@cosmjs/amino";
|
||||
import { encodeSecp256k1Signature, rawSecp256k1PubkeyToRawAddress } from "@cosmjs/amino";
|
||||
import {
|
||||
Bip39,
|
||||
EnglishMnemonic,
|
||||
@ -16,7 +16,6 @@ import { assert, isNonNullObject } from "@cosmjs/utils";
|
||||
|
||||
import { serializeSignDoc, StdSignDoc } from "./encoding";
|
||||
import { makeCosmoshubPath } from "./paths";
|
||||
import { encodeSecp256k1Signature } from "./signature";
|
||||
import { AccountData, AminoSignResponse, OfflineSigner } from "./signer";
|
||||
import {
|
||||
decrypt,
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
import { rawSecp256k1PubkeyToRawAddress } from "@cosmjs/amino";
|
||||
import { encodeSecp256k1Signature, rawSecp256k1PubkeyToRawAddress } from "@cosmjs/amino";
|
||||
import { Secp256k1, Sha256 } from "@cosmjs/crypto";
|
||||
import { Bech32 } from "@cosmjs/encoding";
|
||||
|
||||
import { serializeSignDoc, StdSignDoc } from "./encoding";
|
||||
import { encodeSecp256k1Signature } from "./signature";
|
||||
import { AccountData, AminoSignResponse, OfflineSigner } from "./signer";
|
||||
|
||||
/**
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { decodeSignature } from "@cosmjs/amino";
|
||||
import { Secp256k1, Secp256k1Signature, sha256 } from "@cosmjs/crypto";
|
||||
|
||||
import { makeSignDoc, serializeSignDoc } from "./encoding";
|
||||
import { decodeSignature } from "./signature";
|
||||
import { WrappedStdTx } from "./tx";
|
||||
|
||||
/**
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { StdSignature } from "@cosmjs/amino";
|
||||
|
||||
import { StdSignDoc } from "./encoding";
|
||||
import { StdSignature } from "./types";
|
||||
|
||||
export type Algo = "secp256k1" | "ed25519" | "sr25519";
|
||||
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { StdSignature } from "@cosmjs/amino";
|
||||
|
||||
import { coins } from "./coins";
|
||||
import { makeSignDoc } from "./encoding";
|
||||
import { makeStdTx } from "./tx";
|
||||
import { StdFee, StdSignature } from "./types";
|
||||
import { StdFee } from "./types";
|
||||
|
||||
describe("tx", () => {
|
||||
describe("makeStdTx", () => {
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import { StdSignature } from "@cosmjs/amino";
|
||||
|
||||
import { StdSignDoc } from "./encoding";
|
||||
import { Msg } from "./msgs";
|
||||
import { StdFee, StdSignature } from "./types";
|
||||
import { StdFee } from "./types";
|
||||
|
||||
/**
|
||||
* A Cosmos SDK StdTx
|
||||
|
||||
@ -1,14 +1,7 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { Pubkey } from "@cosmjs/amino";
|
||||
|
||||
import { Coin } from "./coins";
|
||||
|
||||
export interface StdFee {
|
||||
readonly amount: readonly Coin[];
|
||||
readonly gas: string;
|
||||
}
|
||||
|
||||
export interface StdSignature {
|
||||
readonly pub_key: Pubkey;
|
||||
readonly signature: string;
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { Secp256k1, Secp256k1Signature, sha256 } from "@cosmjs/crypto";
|
||||
import { fromBase64, fromHex } from "@cosmjs/encoding";
|
||||
import { coins } from "@cosmjs/launchpad";
|
||||
|
||||
import { coins } from "./coins";
|
||||
import { DirectSecp256k1HdWallet } from "./directsecp256k1hdwallet";
|
||||
import { makeAuthInfoBytes, makeSignBytes, makeSignDoc } from "./signing";
|
||||
import { faucet, testVectors } from "./testutils.spec";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { rawSecp256k1PubkeyToRawAddress } from "@cosmjs/amino";
|
||||
import { encodeSecp256k1Signature, rawSecp256k1PubkeyToRawAddress } from "@cosmjs/amino";
|
||||
import {
|
||||
Bip39,
|
||||
EnglishMnemonic,
|
||||
@ -10,7 +10,6 @@ import {
|
||||
Slip10Curve,
|
||||
} from "@cosmjs/crypto";
|
||||
import { Bech32 } from "@cosmjs/encoding";
|
||||
import { encodeSecp256k1Signature } from "@cosmjs/launchpad";
|
||||
|
||||
import { SignDoc } from "./codec/cosmos/tx/v1beta1/tx";
|
||||
import { makeCosmoshubPath } from "./paths";
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { Secp256k1, Secp256k1Signature, sha256 } from "@cosmjs/crypto";
|
||||
import { fromBase64, fromHex } from "@cosmjs/encoding";
|
||||
import { coins } from "@cosmjs/launchpad";
|
||||
|
||||
import { coins } from "./coins";
|
||||
import { DirectSecp256k1Wallet } from "./directsecp256k1wallet";
|
||||
import { makeAuthInfoBytes, makeSignBytes, makeSignDoc } from "./signing";
|
||||
import { testVectors } from "./testutils.spec";
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { rawSecp256k1PubkeyToRawAddress } from "@cosmjs/amino";
|
||||
import { encodeSecp256k1Signature, rawSecp256k1PubkeyToRawAddress } from "@cosmjs/amino";
|
||||
import { Secp256k1, sha256 } from "@cosmjs/crypto";
|
||||
import { Bech32 } from "@cosmjs/encoding";
|
||||
import { encodeSecp256k1Signature } from "@cosmjs/launchpad";
|
||||
|
||||
import { SignDoc } from "./codec/cosmos/tx/v1beta1/tx";
|
||||
import { AccountData, DirectSignResponse, OfflineDirectSigner } from "./signer";
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import { OfflineSigner as OfflineAminoSigner, StdSignature } from "@cosmjs/launchpad";
|
||||
import { StdSignature } from "@cosmjs/amino";
|
||||
import { OfflineSigner as OfflineAminoSigner } from "@cosmjs/launchpad";
|
||||
|
||||
import { SignDoc } from "./codec/cosmos/tx/v1beta1/tx";
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user