Skip to content

Commit

Permalink
Merge pull request #9 from leapwallet/kjivani/osmojs-any-fix
Browse files Browse the repository at this point in the history
fix: Osmojs any fix
  • Loading branch information
baryon2 authored Oct 21, 2024
2 parents 706569d + 740425e commit 1e7bffe
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@leapwallet/buffer-boba",
"description": "Buffer Boba is a library for decoding protocol buffers in the cosmos ecosystem.",
"version": "0.1.9",
"version": "0.1.10",
"repository": "https://github.com/leapwallet/buffer-boba",
"author": "Leap Wallet",
"license": "MIT",
Expand Down
27 changes: 27 additions & 0 deletions src/proto/google/protobuf/any.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,33 @@ function createBaseAny(): Any {
}
export const Any = {
typeUrl: '/google.protobuf.Any',
is(object: any): object is Any {
return (
object &&
(object.$typeUrl === Any.typeUrl ||
(typeof object.typeUrl === 'string' &&
(object.value instanceof Uint8Array ||
typeof object.value === 'string')))
)
},
isSDK(object: any): object is AnySDKType {
return (
object &&
(object.$typeUrl === Any.typeUrl ||
(typeof object.type_url === 'string' &&
(object.value instanceof Uint8Array ||
typeof object.value === 'string')))
)
},
isAmino(object: any): object is AnyAmino {
return (
object &&
(object.$typeUrl === Any.typeUrl ||
(typeof object.type === 'string' &&
(object.value instanceof Uint8Array ||
typeof object.value === 'string')))
)
},
encode(
message: Any,
writer: BinaryWriter = BinaryWriter.create()
Expand Down

0 comments on commit 1e7bffe

Please sign in to comment.