You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It might be interesting to support optional values on PDA seeds, e.g.:
k.pdaNode({name: "account",seeds: [k.variablePdaSeedNode("from",k.publicKeyTypeNode(),"Funding account"),k.variablePdaSeedNode("seed",k.fixedSizeTypeNode(k.bytesTypeNode(),32),"Optional seed for the account derivation"),k.variablePdaSeedNode("group",k.numberTypeNode("u64"),"Group ID for the address derivation"),],})
In this example, the seed value is optional – it can either be present or not. This would result in the following AccountSeeds for the findAccountPda helper:
exporttypeAccountSeeds={/** Funding account */from: Address;/** Optional seed for the account derivation */seed?: ReadonlyUint8Array;/** Group ID for the address derivation */group: number|bigint;};
You could also combine this with default value support (#107), so you could have optional seed values with a default value if one is not provided.
The text was updated successfully, but these errors were encountered:
It might be interesting to support optional values on PDA seeds, e.g.:
In this example, the
seed
value is optional – it can either be present or not. This would result in the followingAccountSeeds
for thefindAccountPda
helper:You could also combine this with
default
value support (#107), so you could have optional seed values with a default value if one is not provided.The text was updated successfully, but these errors were encountered: