Skip to content

Commit b014d92

Browse files
committed
updates
1 parent 788bd07 commit b014d92

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

concepts/policies/examples/solana.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ For further context on associated token addresses check out Solana’s documenta
9999

100100
**Mint Address Accessibility** The mint account address of the token will only be accessible when the transaction is constructed using instructions that specify the mint address – `TransferChecked` and `TransferCheckedWithFee`. For transactions constructed using the simple `Transfer` method, the mint account will be considered empty.
101101

102+
**WSOL Transfers** Wrapped SOL (WSOL) tokens are special SPL tokens with unique semantics: transferring WSOL “not only modify the token balance but also transfer an equal amount of SOL”. Turnkey transaction metadata includes two fields: `transfers` (for SOL native currency transfers) and `spl_transfers` (for token transfers). WSOL transfers are included only in the latter field, but on-chain both WSOL token and SOL native currency are effectively transferred.
103+
102104
Here are some example policies for SPL transfers:
103105

104106
#### Allow a user to sign Solana transactions that include a single instruction which is an SPL token transfer from a particular sending token address
@@ -165,4 +167,4 @@ Here are some example policies for SPL transfers:
165167
"consensus": "approvers.any(user, user.id == '<USER_ID>')",
166168
"condition": "solana.tx.instructions.count() == 1 && solana.tx.spl_transfers.count() == 1 && solana.tx.spl_transfers.all(transfer, transfer.signers.any(s, s == '<SIGNER_ADDRESS>'))"
167169
}
168-
```
170+
```

concepts/policies/language.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ The language is strongly typed which makes policies easy to author and maintain.
150150
| | parsed_instruction_data | Option\<SolanaParsedInstructionData\> | IDL related field specifying all additional information for an instruction calling a program for which an IDL has been uploaded |
151151
| **Transfer** | from | string | A Solana account (public key) representing the sender of the transfer |
152152
| | to | string | A Solana account (public key) representing the recipient of the transfer |
153-
| | amount | int | The native SOL amount (lamports) for the top-level transfer. Transfers performed indirectly inside other programs (CPI) or via unsupported System Program instructions are not included. |
153+
| | amount | int | The native SOL amount (lamports) for the top-level transfer. Only transfers executed by direct calls to system programs are recognized, transfers performed indirectly inside other programs or via unsupported System Program instructions are not included. |
154154
| **SPLTransfer** | from | string | A Solana account (public key) representing the token account that is sending tokens in this SPL transfer |
155155
| | to | string | A Solana account (public key) representing the token account that is receiving tokens in this SPL transfer |
156-
| | amount | int | The amount (noted in raw atomic units) of this top-level SPL transfer. Only parsed for top-level SPL transfers using Transfer, TransferChecked, or TransferCheckedWithFee. Transfers performed through other Token / Token-2022 instructions are not included. |
156+
| | amount | int | The amount (noted in raw atomic units) of this top-level SPL transfer. Only parsed for top-level SPL transfers using `Transfer`, `TransferChecked`, or `TransferCheckedWithFee`. Transfers performed through other Token / Token-2022 instructions are not included. |
157157
| | owner | string | A Solana account (public key) representing the owner of the sending token account for this SPL transfer |
158158
| | signers | list\<string\> | A list of Solana accounts (public keys) representing the multisig signers (if they exist) for this SPL transfer |
159159
| | token_mint | string | A Solana account (public key) representing the token mint of the token being transferred in this SPL transfer |
@@ -300,7 +300,7 @@ Here are some approaches you might take to govern transfers:
300300
- Only match if there is a _single_ transfer in the transaction, _and_ that transfer meets the criteria ([example](/concepts/policies/examples/solana#allow-solana-transactions-that-have-exactly-one-transfer,-to-one-specific-recipient)). This is the most secure approach, and thus most restrictive.
301301

302302

303-
See the [Solana policy examples](/concepts/policies/examples/solana) for sample transfer scenarios.
303+
See the [Solana policy examples](/concepts/policies/examples/solana) for sample scenarios.
304304

305305
### Tron
306306

0 commit comments

Comments
 (0)