From 038b6828057ab252af59f7464a080131cb35835e Mon Sep 17 00:00:00 2001 From: karancoder Date: Mon, 21 Oct 2024 14:03:06 +0530 Subject: [PATCH 1/2] fix: add missing methods to Any proto type --- src/proto/google/protobuf/any.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/proto/google/protobuf/any.ts b/src/proto/google/protobuf/any.ts index da6ff31..134aa90 100644 --- a/src/proto/google/protobuf/any.ts +++ b/src/proto/google/protobuf/any.ts @@ -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() From 740425ee8304a1ea101a96cba3e85f1c6ad8d60a Mon Sep 17 00:00:00 2001 From: karancoder Date: Mon, 21 Oct 2024 14:04:22 +0530 Subject: [PATCH 2/2] chore: update package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 436e982..5542399 100644 --- a/package.json +++ b/package.json @@ -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",