@saberhq/anchor-contrib
Advanced tools
Comparing version 1.6.2 to 1.7.0
@@ -35,3 +35,3 @@ /// <reference types="node" /> | ||
declare type AccountsNamespace<A> = { | ||
[K in keyof A]: Omit<AccountClient, "fetch" | "all" | "associated"> & { | ||
[K in keyof A]: Omit<AccountClient, "fetch" | "fetchNullable" | "all" | "associated"> & { | ||
/** | ||
@@ -44,2 +44,8 @@ * Returns a deserialized account. | ||
/** | ||
* Returns a deserialized account, returning null if it doesn't exist. | ||
* | ||
* @param address The address of the account to fetch. | ||
*/ | ||
fetchNullable: (address: PublicKey) => Promise<A[K] | null>; | ||
/** | ||
* Returns all instances of this account type for the program. | ||
@@ -46,0 +52,0 @@ */ |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "1.6.2", | ||
"version": "1.7.0", | ||
"main": "dist/index.js", | ||
@@ -18,3 +18,3 @@ "author": "Ian Macalinao <ian@saber.so>", | ||
"peerDependencies": { | ||
"@project-serum/anchor": "^0.17.1-beta.1", | ||
"@project-serum/anchor": "^0.17.0 || ^0.18.0", | ||
"@solana/web3.js": ">=1.29.2" | ||
@@ -37,3 +37,3 @@ }, | ||
}, | ||
"gitHead": "b2cbb53fa1ec6f478f3e64921733ea0d14ec0947" | ||
"gitHead": "6426b68f3def352b6f7712428c29a957425df1d1" | ||
} |
@@ -83,3 +83,6 @@ import type { | ||
type AccountsNamespace<A> = { | ||
[K in keyof A]: Omit<AccountClient, "fetch" | "all" | "associated"> & { | ||
[K in keyof A]: Omit< | ||
AccountClient, | ||
"fetch" | "fetchNullable" | "all" | "associated" | ||
> & { | ||
/** | ||
@@ -92,2 +95,8 @@ * Returns a deserialized account. | ||
/** | ||
* Returns a deserialized account, returning null if it doesn't exist. | ||
* | ||
* @param address The address of the account to fetch. | ||
*/ | ||
fetchNullable: (address: PublicKey) => Promise<A[K] | null>; | ||
/** | ||
* Returns all instances of this account type for the program. | ||
@@ -94,0 +103,0 @@ */ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
33587
401