@solana/transactions 2.0.0-experimental.a48ebd2 → 2.0.0-experimental.a7a613a

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.
Files changed (51) hide show
  1. package/README.md +7 -3
  2. package/dist/index.browser.cjs +297 -377
  3. package/dist/index.browser.cjs.map +1 -1
  4. package/dist/index.browser.js +296 -381
  5. package/dist/index.browser.js.map +1 -1
  6. package/dist/index.native.js +296 -381
  7. package/dist/index.native.js.map +1 -1
  8. package/dist/index.node.cjs +297 -377
  9. package/dist/index.node.cjs.map +1 -1
  10. package/dist/index.node.js +296 -381
  11. package/dist/index.node.js.map +1 -1
  12. package/dist/types/blockhash.d.ts +5 -7
  13. package/dist/types/blockhash.d.ts.map +1 -1
  14. package/dist/types/compilable-transaction.d.ts +4 -4
  15. package/dist/types/compile-address-table-lookups.d.ts +1 -1
  16. package/dist/types/compile-header.d.ts +1 -1
  17. package/dist/types/compile-instructions.d.ts +1 -1
  18. package/dist/types/compile-lifetime-token.d.ts +1 -1
  19. package/dist/types/compile-static-accounts.d.ts +1 -1
  20. package/dist/types/compile-transaction.d.ts +3 -3
  21. package/dist/types/create-transaction.d.ts +1 -1
  22. package/dist/types/decompile-transaction.d.ts +12 -4
  23. package/dist/types/decompile-transaction.d.ts.map +1 -1
  24. package/dist/types/durable-nonce.d.ts +2 -2
  25. package/dist/types/fee-payer.d.ts +2 -2
  26. package/dist/types/index.d.ts +13 -11
  27. package/dist/types/index.d.ts.map +1 -1
  28. package/dist/types/instructions.d.ts +4 -2
  29. package/dist/types/instructions.d.ts.map +1 -1
  30. package/dist/types/message.d.ts +6 -6
  31. package/dist/types/serializers/address-table-lookup.d.ts +5 -5
  32. package/dist/types/serializers/address-table-lookup.d.ts.map +1 -1
  33. package/dist/types/serializers/header.d.ts +5 -5
  34. package/dist/types/serializers/header.d.ts.map +1 -1
  35. package/dist/types/serializers/index.d.ts +2 -2
  36. package/dist/types/serializers/instruction.d.ts +5 -5
  37. package/dist/types/serializers/instruction.d.ts.map +1 -1
  38. package/dist/types/serializers/message.d.ts +5 -5
  39. package/dist/types/serializers/message.d.ts.map +1 -1
  40. package/dist/types/serializers/transaction-version.d.ts +5 -5
  41. package/dist/types/serializers/transaction-version.d.ts.map +1 -1
  42. package/dist/types/serializers/transaction.d.ts +9 -6
  43. package/dist/types/serializers/transaction.d.ts.map +1 -1
  44. package/dist/types/signatures.d.ts +2 -2
  45. package/dist/types/signatures.d.ts.map +1 -1
  46. package/dist/types/unsigned-transaction.d.ts +1 -1
  47. package/dist/types/wire-transaction.d.ts +1 -1
  48. package/package.json +18 -39
  49. package/dist/index.development.js +0 -1783
  50. package/dist/index.development.js.map +0 -1
  51. package/dist/index.production.min.js +0 -31
package/README.md CHANGED
@@ -30,7 +30,7 @@ const transferTransaction = pipe(
30
30
  createTransaction({ version: 0 }),
31
31
  tx => setTransactionFeePayer(myAddress, tx),
32
32
  tx => setTransactionLifetimeUsingBlockhash(latestBlockhash, tx),
33
- tx => appendTransactionInstruction(createTransferInstruction(myAddress, toAddress, amountInLamports), tx)
33
+ tx => appendTransactionInstruction(createTransferInstruction(myAddress, toAddress, amountInLamports), tx),
34
34
  );
35
35
  ```
36
36
 
@@ -144,7 +144,7 @@ const nonce =
144
144
 
145
145
  const durableNonceTransaction = setTransactionLifetimeUsingDurableNonce(
146
146
  { nonce, nonceAccountAddress, nonceAuthorityAddress },
147
- tx
147
+ tx,
148
148
  );
149
149
  ```
150
150
 
@@ -210,14 +210,18 @@ const memoTransaction = appendTransactionInstruction(
210
210
  data: new TextEncoder().encode('Hello world!'),
211
211
  programAddress: address('MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr'),
212
212
  },
213
- tx
213
+ tx,
214
214
  );
215
215
  ```
216
216
 
217
+ If you'd like to add multiple instructions to a transaction at once, you may use the `appendTransactionInstructions` function instead which accepts an array of instructions.
218
+
217
219
  #### `prependTransactionInstruction()`
218
220
 
219
221
  Given an instruction, this method will return a new transaction with that instruction having been added to the beginning of the list of existing instructions.
220
222
 
223
+ If you'd like to prepend multiple instructions to a transaction at once, you may use the `prependTransactionInstructions` function instead which accepts an array of instructions.
224
+
221
225
  See [`appendTransactionInstruction()`](#appendtransactioninstruction) for an example of how to use this function.
222
226
 
223
227
  ## Signing transactions