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
Once approved, the delegate can transfer tokens on behalf of the owner. The delegate is the transaction authority. Only the delegate and fee payer sign; the owner's signature is not required.
126
126
127
-
`transferInterface` takes a recipient wallet address and creates the recipient's associated token account internally. Pass `{ owner }` to transfer as a delegate instead of the owner.
127
+
`transferInterface` takes a recipient wallet address and creates the recipient's associated token account internally. For delegated transfers, pass the **source token-account owner** as **`owner`** (pubkey) and the **delegate**as **`authority`** (signer). Do not use removed **`InterfaceOptions.owner`** — there is no `{ owner: ... }` options bag for this flow.
`createTransferInterfaceInstructions` returns `TransactionInstruction[][]` for manual transaction control. Pass `owner` to transfer as a delegate.
154
+
`createTransferInterfaceInstructions` returns `TransactionInstruction[][]` for manual transaction control. Pass the **token-account owner** pubkey as the flat **`owner`** argument; for delegate-signed transactions, set **`options.delegatePubkey`**.
Copy file name to clipboardExpand all lines: resources/migration-v1-to-v2.mdx
+3-9Lines changed: 3 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -242,20 +242,14 @@ import {
242
242
deriveAddressSeedV2,
243
243
batchAddressTree,
244
244
PackedAccounts,
245
-
featureFlags,
246
-
VERSION,
247
245
} from"@lightprotocol/stateless.js";
248
246
```
249
247
250
-
### Enable v2 mode
248
+
### V2 mode (TypeScript)
251
249
252
-
Set the feature flag before making any calls:
250
+
Published **`@lightprotocol/stateless.js@^0.23.0`** defaults to **V2** — you do **not** need to set **`LIGHT_PROTOCOL_VERSION=V2`** in application code.
253
251
254
-
```typescript
255
-
import { featureFlags, VERSION } from"@lightprotocol/stateless.js";
256
-
257
-
(featureFlagsasany).version=VERSION.V2;
258
-
```
252
+
If you **build `stateless.js` from source** and need V1 artifacts, set **`LIGHT_PROTOCOL_VERSION=V1`** for that build. For rare runtime overrides in custom bundles, you can still assign **`featureFlags.version`** before other imports run (advanced; prefer matching published versions instead).
transferInterface() transfers tokens in a single call. The recipient parameter is a wallet public key.
16
+
Pass the source token-account owner pubkey and the signing authority separately: owner-signed flows use (owner.publicKey, owner); delegated flows use (owner.publicKey, delegate). Do not use removed InterfaceOptions.owner.
16
17
The SDK derives and creates the destination ATA internally. All transfers use transferChecked under the hood.
transferInterface() transfers tokens in a single call. The recipient parameter is a wallet public key.
80
+
Pass the source token-account owner pubkey and the signing authority separately: owner-signed flows use (owner.publicKey, owner); delegated flows use (owner.publicKey, delegate). Do not use removed InterfaceOptions.owner.
79
81
The SDK derives and creates the destination ATA internally. All transfers use transferChecked under the hood.
0 commit comments