- Scope:
enroll:writeon both stages. - Idempotency anchor: Stage 1 returns
flowId. It is valid for 24 hours. - Result: Stage 2 creates one smart account for each requested chain.
- Atomicity: Stage 2 creates all requested accounts or no accounts.
flowId. The Solana signature depends on the owner
model. See
Solana (SVM) enrollment.
Sequence
Stage 1: Request the signable message
POST /v2/enroll/signature
Glider verifies that the strategy belongs to your tenant. It reads the next
available account index. Then, it returns the session-key message and the
assigned agent wallet.
Peek, not reserve
Stage 1 readsaccountIndex but does not reserve it. Repeated calls for the
same user return the same candidate index. The index changes only after stage
2 succeeds. Abandoned flows do not consume indices.
Unsupported chain ids
Each deployment has a configured set of chains. An unknown or unconfigured chain returns400. The details field identifies the rejected value. Ask
Glider which chains are enabled. Do not use a fixed global chain list.
Stage 2: Sign and submit
The user signs the returned message in their wallet. ForaccountType: "ECDSA", sign message.raw with ECDSA personal_sign.
For accountType: "ERC1271", sign message.typedData as EIP-712 typed data.
An ERC-1271 signature supports one EVM chain. Then, send all stage-1 fields to
POST /v2/enroll.
Round-trip contract
Send these fields to stage 2 byte-for-byte unchanged. A change causes signature verification to fail.Solana (SVM) enrollment
Thesvm_b2b_api entitlement controls Solana enrollment for each tenant.
Without this entitlement, a Solana request returns 403 API_104.
Each request uses one namespace. Send Solana (1399811149) chain IDs or EVM
chain IDs. Do not send both namespaces in one request.
Both owner models create one Swig smart wallet for each (tenant, user) pair.
Later enrollments reuse this wallet. Each portfolio uses a Swig sub-account.
The user funds the address in depositAccountId.
The same address appears in smartAccounts[].accountId. The swigRoleId
field identifies its role. The reusedSwig field is true when Glider reuses
an existing Swig wallet.
Model B: Solana-rooted user
The Solana wallet of the user is the Swig root authority.ownerAccountId
uses a solana: CAIP-10 value. Stage 1 returns a serialized Solana
transaction. The user signs this transaction.
Stage 2 sends the signed bytes in signedSolanaTransaction. Glider verifies
the user signature. The pooled agent adds its signature and submits the
transaction. The paymaster pays the transaction fee.
signature in stage 2. Send signedSolanaTransaction instead.
The transaction contains a recent blockhash. Sign and submit it promptly.
Model A: EVM-rooted user on Solana
An EVM wallet can own a Solana sub-account. KeepownerAccountId as
eip155:0:<addr>. Set chainIds to [1399811149]. The secp256k1 key of the
user becomes the Swig root.
Stage 1 returns swigAccountId, depositAccountId, swigRoleId, and
reusedSwig. It also returns an ecdsa message for information. The user
does not sign this message.
The client must get a current slot and build the Swig add-authority payload.
The payload uses swigAccountId, agentAccountId, and the slot. The user
signs its hash with personal_sign.
Send userSecp256k1PublicKey, signature, and currentSlot to stage 2. You
can also send ownerSignatureScheme. Its default value is eip191. Swig
uses a short slot window. Build and submit the request immediately.
smartAccounts[] entry
includes the funded sub-account, depositAccountId, and swigRoleId.
Error handling
See Idempotency for the full 409 model.
Common errors
- Do not change
accountIndexbetween stages."7"and7are different values. The schema requires a decimal string. - Do not create a new
flowIdfor a stage-2 retry. A new value starts a new flow. Retry with the originalflowIdunless the error is final. - Do not send a chain-bound EVM
ownerAccountId. Use the chain-agnosticeip155:0:<addr>form. Model B Solana owners are the exception. They use the mainnetsolana:5eykt4…:<base58>form. Use CAIP identifiers to pick the right form. - Do not sign the informational Model A
message. The user must sign the slot-bound add-authority payload. A signature ofmessagefails stage 2. - Do not call stage 2 after 24 hours. The
flowIdis no longer valid. Start again at stage 1.