@codama/renderers-rust 1.0.16 → 1.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -131,7 +131,7 @@ impl<'a> TryFrom<&solana_program::account_info::AccountInfo<'a>> for {{ account.
131
131
  #[cfg(feature = "fetch")]
132
132
  pub fn fetch_{{ account.name | snakeCase }}(
133
133
  rpc: &solana_client::rpc_client::RpcClient,
134
- address: &Pubkey,
134
+ address: &solana_program::pubkey::Pubkey,
135
135
  ) -> Result<crate::shared::DecodedAccount<{{ account.name | pascalCase }}>, std::io::Error> {
136
136
  let accounts = fetch_all_{{ account.name | snakeCase }}(rpc, &[*address])?;
137
137
  Ok(accounts[0].clone())
@@ -140,9 +140,9 @@ pub fn fetch_{{ account.name | snakeCase }}(
140
140
  #[cfg(feature = "fetch")]
141
141
  pub fn fetch_all_{{ account.name | snakeCase }}(
142
142
  rpc: &solana_client::rpc_client::RpcClient,
143
- addresses: &[Pubkey],
143
+ addresses: &[solana_program::pubkey::Pubkey],
144
144
  ) -> Result<Vec<crate::shared::DecodedAccount<{{ account.name | pascalCase }}>>, std::io::Error> {
145
- let accounts = rpc.get_multiple_accounts(&addresses)
145
+ let accounts = rpc.get_multiple_accounts(addresses)
146
146
  .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?;
147
147
  let mut decoded_accounts: Vec<crate::shared::DecodedAccount<{{ account.name | pascalCase }}>> = Vec::new();
148
148
  for i in 0..addresses.len() {
@@ -158,7 +158,7 @@ pub fn fetch_all_{{ account.name | snakeCase }}(
158
158
  #[cfg(feature = "fetch")]
159
159
  pub fn fetch_maybe_{{ account.name | snakeCase }}(
160
160
  rpc: &solana_client::rpc_client::RpcClient,
161
- address: &Pubkey,
161
+ address: &solana_program::pubkey::Pubkey,
162
162
  ) -> Result<crate::shared::MaybeAccount<{{ account.name | pascalCase }}>, std::io::Error> {
163
163
  let accounts = fetch_all_maybe_{{ account.name | snakeCase }}(rpc, &[*address])?;
164
164
  Ok(accounts[0].clone())
@@ -167,9 +167,9 @@ pub fn fetch_maybe_{{ account.name | snakeCase }}(
167
167
  #[cfg(feature = "fetch")]
168
168
  pub fn fetch_all_maybe_{{ account.name | snakeCase }}(
169
169
  rpc: &solana_client::rpc_client::RpcClient,
170
- addresses: &[Pubkey],
170
+ addresses: &[solana_program::pubkey::Pubkey],
171
171
  ) -> Result<Vec<crate::shared::MaybeAccount<{{ account.name | pascalCase }}>>, std::io::Error> {
172
- let accounts = rpc.get_multiple_accounts(&addresses)
172
+ let accounts = rpc.get_multiple_accounts(addresses)
173
173
  .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?;
174
174
  let mut decoded_accounts: Vec<crate::shared::MaybeAccount<{{ account.name | pascalCase }}>> = Vec::new();
175
175
  for i in 0..addresses.len() {
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/utils/render.ts"],"names":[],"mappings":"AAIA,OAAiB,EAAE,gBAAgB,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AAEzE,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAInD;AAED,eAAO,MAAM,MAAM,aAAc,MAAM,YAAY,MAAM,YAAY,eAAe,KAAG,MAYtF,CAAC"}
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/utils/render.ts"],"names":[],"mappings":"AAIA,OAAiB,EAAE,gBAAgB,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AAEzE,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAInD;AAED,eAAO,MAAM,MAAM,GAAI,UAAU,MAAM,EAAE,UAAU,MAAM,EAAE,UAAU,eAAe,KAAG,MAYtF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codama/renderers-rust",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Renders Rust clients for your programs",
5
5
  "exports": {
6
6
  "types": "./dist/types/index.d.ts",
@@ -30,14 +30,14 @@
30
30
  "dependencies": {
31
31
  "@solana/codecs-strings": "rc",
32
32
  "nunjucks": "^3.2.4",
33
- "@codama/errors": "1.2.8",
34
- "@codama/nodes": "1.2.8",
35
- "@codama/renderers-core": "1.0.10",
36
- "@codama/visitors-core": "1.2.8"
33
+ "@codama/errors": "1.2.9",
34
+ "@codama/nodes": "1.2.9",
35
+ "@codama/visitors-core": "1.2.9",
36
+ "@codama/renderers-core": "1.0.11"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/nunjucks": "^3.2.6",
40
- "@codama/nodes-from-anchor": "1.1.8"
40
+ "@codama/nodes-from-anchor": "1.1.9"
41
41
  },
42
42
  "license": "MIT",
43
43
  "repository": {