File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @terran-one/cosmwasm-vm-js" ,
3- "version" : " 0.1.14 " ,
3+ "version" : " 0.1.15 " ,
44 "license" : " MIT" ,
55 "author" : " TerranOne" ,
66 "main" : " dist/index.js" ,
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ export interface IStorage {
99 set ( key : Uint8Array , value : Uint8Array ) : void ;
1010
1111 remove ( key : Uint8Array ) : void ;
12+
13+ keys ( ) : Iterable < Uint8Array > ;
1214}
1315
1416export class Record {
@@ -42,6 +44,12 @@ export interface IIterStorage {
4244export class BasicKVStorage implements IStorage {
4345 // TODO: Add binary uint / typed Addr maps for cw-storage-plus compatibility
4446 constructor ( public dict : Immutable . Map < string , string > = Immutable . Map ( ) ) { }
47+
48+ * keys ( ) {
49+ for ( const key of this . dict . keys ( ) ) {
50+ yield fromBase64 ( key ) ;
51+ }
52+ }
4553
4654 get ( key : Uint8Array ) : Uint8Array | null {
4755 const keyStr = toBase64 ( key ) ;
You can’t perform that action at this time.
0 commit comments