Skip to content

Instantly share code, notes, and snippets.

View phips28's full-sized avatar
🗼

Phil phips28

🗼
View GitHub Profile
@phips28
phips28 / signEvmWithKeplr.ts
Created March 14, 2024 20:21
Sign Cosmos-EVM chains with Keplr
import { SigningStargateClient } from '@cosmjs/stargate'
import { fromBase64, toBase64 } from '@cosmjs/encoding'
import { makeAuthInfoBytes, makeSignDoc } from '@cosmjs/proto-signing'
import { Int53 } from '@cosmjs/math'
import { Any } from 'cosmjs-types/google/protobuf/any'
import { PubKey } from 'cosmjs-types/cosmos/crypto/secp256k1/keys'
import { AuthInfo, Fee, Tx, TxBody, TxRaw } from 'cosmjs-types/cosmos/tx/v1beta1/tx'
import { isDev } from '@/helpers/env'
import { OfflineDirectSigner } from '@cosmjs/proto-signing/build/signer'
import { StdFee } from '@cosmjs/amino'