solana-studio 0.4.4 → 0.4.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cae5d5807d954cbf5b077cb39c210fced82fa2e823c877c4897b2a796ff517ad
4
- data.tar.gz: 78a66eaeb6a45f305b5f5cffaf2c884337921641b45b000f73db66b4bb755397
3
+ metadata.gz: c2ffb18603f4ee37c57d42d010090922d657450172cf5d6623e9d637f1650eb5
4
+ data.tar.gz: 1e50dff5950f8dd69dae20590c899930f0e6c4342173cbac93d36b8828554307
5
5
  SHA512:
6
- metadata.gz: 79b1a41df100c355db139e9542d457cc2a093c88017ac1b26b3360da1eb45babc0706b5ccf8b27f1b59e3021516ea67dd8b2fb4fc0eaec6a156158f5c64c8630
7
- data.tar.gz: d6fdb39c569d0e950dabd14680b85508d64ba396ef10fac8ccde8a20f10fd6b2511cff8b1e651accb6043e9a5102c61523b19e5c0782d6fcff39959a613b3155
6
+ metadata.gz: 41cba2106cced3ae803cb268ed5a5b94d46052ba20045ec50004b40e6f4745443515a015244417d0ab65558d79ff274ceffcaa1a43398d6c11bcdfc7256a3eb6
7
+ data.tar.gz: 444c36f828dcc16865f48cd749b5490cf541298f470b8c8f1628875f3d05df33f23e4c1295170772e6f9adb92d9aad3064bd31104b2e5b1c065b06cad4cdf8b0
@@ -172,12 +172,15 @@ module Solana
172
172
  def collect_account_keys(additional_signers = [])
173
173
  keys = {}
174
174
 
175
- # Fee payer (first signer) is always first
176
- fee_payer = @signers.first.public_key_bytes
175
+ # Fee payer (first signer) is always first. In a fully-keyless build there
176
+ # are no local @signers, so fall back to the first ADDITIONAL signer
177
+ # (callers order additional_signers with the fee payer first). The
178
+ # serialize/serialize_partial guards guarantee at least one is present.
179
+ fee_payer = @signers.first&.public_key_bytes || additional_signers.first
177
180
  keys[fee_payer] = { is_signer: true, is_writable: true }
178
181
 
179
- # Other signers
180
- @signers[1..].each do |signer|
182
+ # Other signers (drop(1) is nil-safe when @signers is empty — keyless build)
183
+ @signers.drop(1).each do |signer|
181
184
  pk = signer.public_key_bytes
182
185
  keys[pk] ||= { is_signer: true, is_writable: false }
183
186
  keys[pk][:is_signer] = true
data/lib/solana_studio.rb CHANGED
@@ -6,5 +6,5 @@ require_relative "solana/spl_token"
6
6
  require_relative "solana/auth_verifier"
7
7
 
8
8
  module SolanaStudio
9
- VERSION = "0.4.4"
9
+ VERSION = "0.4.5"
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solana-studio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex McRitchie