Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@saberhq/anchor-contrib

Package Overview
Dependencies
Maintainers
2
Versions
182
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@saberhq/anchor-contrib - npm Package Compare versions

Comparing version 1.2.6 to 1.2.7

15

dist/index.d.ts

@@ -107,8 +107,6 @@ /// <reference types="node" />

export declare type AnchorError<T extends Idl> = NonNullable<T["errors"]>[number];
declare type FieldsOfType<I extends {
declare type FieldsOfType<I extends IdlTypeDef> = I extends {
type: IdlTypeDefTyStruct;
}> = I["type"]["fields"][number];
declare type AnchorTypeDefStruct<I extends {
type: IdlTypeDefTyStruct;
}, Defined> = {
} ? NonNullable<I["type"]["fields"]>[number] : never;
declare type AnchorTypeDef<I extends IdlTypeDef, Defined> = {
[F in FieldsOfType<I>["name"]]: DecodeType<(FieldsOfType<I> & {

@@ -118,5 +116,2 @@ name: F;

};
declare type AnchorTypeDef<I extends IdlTypeDef, Defined> = I extends {
type: IdlTypeDefTyStruct;
} ? AnchorTypeDefStruct<I, Defined> : string;
declare type AnchorTypeDefs<T extends IdlTypeDef[], Defined> = {

@@ -129,5 +124,3 @@ [K in T[number]["name"]]: AnchorTypeDef<T[number] & {

export declare type AnchorAccounts<T extends Idl, Defined> = AnchorTypeDefs<NonNullable<T["accounts"]>, Defined>;
export declare type AnchorState<T extends Idl, Defined> = NonNullable<T["state"]>["struct"] extends {
type: IdlTypeDefTyStruct;
} ? AnchorTypeDef<NonNullable<T["state"]>["struct"], Defined> : never;
export declare type AnchorState<T extends Idl, Defined> = AnchorTypeDef<NonNullable<T["state"]>["struct"], Defined>;
export declare type AnchorTypes<T extends Idl, AccountMap = Record<string, never>, D = Record<string, never>, DEF = AnchorDefined<T, D>> = {

@@ -134,0 +127,0 @@ Defined: DEF;

@@ -7,3 +7,3 @@ {

},
"version": "1.2.6",
"version": "1.2.7",
"main": "dist/index.js",

@@ -29,3 +29,3 @@ "author": "Ian Macalinao <ian@saber.so>",

},
"gitHead": "b36251e378425a68386cc35b446e3bd96bd7ead4"
"gitHead": "38c683bd918a9cd7daff771af29586e0ea056ad4"
}

@@ -177,9 +177,9 @@ import type {

type FieldsOfType<
I extends {
type: IdlTypeDefTyStruct;
}
> = I["type"]["fields"][number];
type FieldsOfType<I extends IdlTypeDef> = I extends {
type: IdlTypeDefTyStruct;
}
? NonNullable<I["type"]["fields"]>[number]
: never;
type AnchorTypeDefStruct<I extends { type: IdlTypeDefTyStruct }, Defined> = {
type AnchorTypeDef<I extends IdlTypeDef, Defined> = {
[F in FieldsOfType<I>["name"]]: DecodeType<

@@ -191,8 +191,2 @@ (FieldsOfType<I> & { name: F })["type"],

type AnchorTypeDef<I extends IdlTypeDef, Defined> = I extends {
type: IdlTypeDefTyStruct;
}
? AnchorTypeDefStruct<I, Defined>
: string;
type AnchorTypeDefs<T extends IdlTypeDef[], Defined> = {

@@ -212,7 +206,6 @@ [K in T[number]["name"]]: AnchorTypeDef<T[number] & { name: K }, Defined>;

export type AnchorState<T extends Idl, Defined> = NonNullable<
T["state"]
>["struct"] extends { type: IdlTypeDefTyStruct }
? AnchorTypeDef<NonNullable<T["state"]>["struct"], Defined>
: never;
export type AnchorState<T extends Idl, Defined> = AnchorTypeDef<
NonNullable<T["state"]>["struct"],
Defined
>;

@@ -219,0 +212,0 @@ export type AnchorTypes<

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc