Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
164df37
feat: implement NEAR Protocol as second-class citizen chain
gomesalexandre Dec 26, 2025
122fb68
fix: add NEAR to getNativeFeeAssetReference
gomesalexandre Dec 26, 2025
3109d87
fix: use descriptive error from NEAR RPC response
gomesalexandre Dec 26, 2025
8b14ebe
docs: add getNativeFeeAssetReference gotcha to chain-integration skill
gomesalexandre Dec 26, 2025
d99ec67
fix: implement NEAR case in accountToPortfolio
gomesalexandre Dec 26, 2025
1139831
docs: add accountToPortfolio gotcha to chain-integration skill
gomesalexandre Dec 26, 2025
b6b47e6
feat: add NEAR support to NEAR Intents swapper
gomesalexandre Dec 26, 2025
68c6e58
fix: use plain bs58 encoding for NEAR public keys
gomesalexandre Dec 26, 2025
1e38261
feat: add NEAR chain namespace support for fee data
gomesalexandre Dec 26, 2025
d91e0d9
fix: read fresh swap state in trade execution event handlers
gomesalexandre Dec 26, 2025
0e57d39
[skip ci] feat: skip ci
gomesalexandre Dec 27, 2025
b2aeea6
[skip ci] feat: progression
gomesalexandre Dec 27, 2025
3e504fa
feat: implement swaps FROM NEAR and token balance fetching
gomesalexandre Dec 27, 2025
6bac80b
feat: add Ledger and Trezor NEAR hardware wallet support
gomesalexandre Dec 27, 2025
22df129
docs: add Native Agent to crew structure
gomesalexandre Dec 27, 2025
915e346
feat: add chain-integration-crew skill for full e2e chain integration
gomesalexandre Dec 27, 2025
7443140
feat: add NEP-141 token sends and RPC failover for NEAR
gomesalexandre Dec 27, 2025
1e2d93c
feat: add Ledger NEAR transport support and swapper token fix
gomesalexandre Dec 27, 2025
eb54f2c
fix: handle NEAR implicit accounts that don't exist on-chain
gomesalexandre Dec 27, 2025
ff87f4c
fix: dedupe assetIds in popular assets
gomesalexandre Dec 27, 2025
d684b7a
[skip ci] fix: replace NearBlocks with FastNEAR API for token balances
gomesalexandre Dec 27, 2025
689806c
Merge remote-tracking branch 'origin/develop' into near_chain
gomesalexandre Dec 27, 2025
901b462
[skip ci] refactor: NEAR chain adapter improvements
gomesalexandre Dec 27, 2025
8870d6c
[skip ci] chore: remove NEAR planning docs
gomesalexandre Dec 27, 2025
479bfbc
[skip ci] chore: bump @shapeshiftoss/hdwallet-* to 1.62.33
gomesalexandre Dec 27, 2025
70e7e15
[skip ci] chore: revert .yarnrc.yml to origin/develop
gomesalexandre Dec 27, 2025
a86b599
fix: derivation path and update hdwallet
NeOMakinG Dec 30, 2025
cde32b3
fix(caip): load dotenv in coincap adapter generation script
gomesalexandre Jan 3, 2026
c21c75a
fix(near): add rate limit retry with exponential backoff
gomesalexandre Jan 3, 2026
fcae5ba
fix(near): reduce individual provider retries to enable faster failover
gomesalexandre Jan 3, 2026
c8deab3
fix: address NEAR chain review feedback
gomesalexandre Jan 3, 2026
eb421c0
fix: use skipDeviceDerivation pattern for NEAR pubKey handling
gomesalexandre Jan 3, 2026
f9d359d
fix: surgically restore NEAR changes without lint noise
gomesalexandre Jan 3, 2026
62621c0
fix: move FastNEAR API version path from env to code for CSP compliance
gomesalexandre Jan 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: handle NEAR implicit accounts that don't exist on-chain
- Fix Ledger NEAR address derivation to return hex format (not ed25519:base58)
- Fix Ledger NEAR signature to return hex format (not bs58)
- Handle FailoverRpcProvider's "Exceeded N providers" error for unfunded accounts
- Update hdwallet to 1.62.35-near-chain.4

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
  • Loading branch information
gomesalexandre and claude committed Dec 27, 2025
commit eb54f2c74145d15f7d66014350c71f2bdc19ed21
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,24 +104,24 @@
"@shapeshiftoss/chain-adapters": "workspace:^",
"@shapeshiftoss/contracts": "workspace:^",
"@shapeshiftoss/errors": "workspace:^",
"@shapeshiftoss/hdwallet-coinbase": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-core": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-gridplus": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-keepkey": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-keepkey-webusb": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-keplr": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-ledger": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-ledger-webhid": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-ledger-webusb": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-metamask-multichain": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-native": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-native-vault": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-phantom": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-trezor": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-trezor-connect": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-vultisig": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-walletconnect": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-walletconnectv2": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-coinbase": "1.62.35-near-chain.4",
"@shapeshiftoss/hdwallet-core": "1.62.35-near-chain.4",
"@shapeshiftoss/hdwallet-gridplus": "1.62.35-near-chain.4",
"@shapeshiftoss/hdwallet-keepkey": "1.62.35-near-chain.4",
"@shapeshiftoss/hdwallet-keepkey-webusb": "1.62.35-near-chain.4",
"@shapeshiftoss/hdwallet-keplr": "1.62.35-near-chain.4",
"@shapeshiftoss/hdwallet-ledger": "1.62.35-near-chain.4",
"@shapeshiftoss/hdwallet-ledger-webhid": "1.62.35-near-chain.4",
"@shapeshiftoss/hdwallet-ledger-webusb": "1.62.35-near-chain.4",
"@shapeshiftoss/hdwallet-metamask-multichain": "1.62.35-near-chain.4",
"@shapeshiftoss/hdwallet-native": "1.62.35-near-chain.4",
"@shapeshiftoss/hdwallet-native-vault": "1.62.35-near-chain.4",
"@shapeshiftoss/hdwallet-phantom": "1.62.35-near-chain.4",
"@shapeshiftoss/hdwallet-trezor": "1.62.35-near-chain.4",
"@shapeshiftoss/hdwallet-trezor-connect": "1.62.35-near-chain.4",
"@shapeshiftoss/hdwallet-vultisig": "1.62.35-near-chain.4",
"@shapeshiftoss/hdwallet-walletconnect": "1.62.35-near-chain.4",
"@shapeshiftoss/hdwallet-walletconnectv2": "1.62.35-near-chain.4",
"@shapeshiftoss/swapper": "workspace:^",
"@shapeshiftoss/types": "workspace:^",
"@shapeshiftoss/unchained-client": "workspace:^",
Expand Down
4 changes: 2 additions & 2 deletions packages/chain-adapters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"@near-js/transactions": "^2.5.1",
"@near-js/utils": "^2.5.1",
"@shapeshiftoss/caip": "workspace:^",
"@shapeshiftoss/hdwallet-core": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-ledger": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-core": "1.62.35-near-chain.4",
"@shapeshiftoss/hdwallet-ledger": "1.62.35-near-chain.4",
"@shapeshiftoss/types": "workspace:^",
"@shapeshiftoss/unchained-client": "workspace:^",
"@shapeshiftoss/utils": "workspace:^",
Expand Down
13 changes: 12 additions & 1 deletion packages/chain-adapters/src/near/NearChainAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,18 @@ export class ChainAdapter implements IChainAdapter<KnownChainIds.NearMainnet> {
}
} catch (err) {
const errorMessage = err instanceof Error ? err.message : String(err)
if (errorMessage.includes('does not exist') || errorMessage.includes('UNKNOWN_ACCOUNT')) {
const errorType = (err as { type?: string }).type

// Handle non-existent accounts (implicit accounts that haven't received funds yet)
// FailoverRpcProvider wraps errors: when all providers fail with "account doesn't exist",
// it throws "Exceeded N providers" with type "RetriesExceeded" - original error is lost
if (
errorMessage.includes("doesn't exist") ||
errorMessage.includes('does not exist') ||
errorMessage.includes('UNKNOWN_ACCOUNT') ||
errorMessage.includes('Exceeded') ||
errorType === 'RetriesExceeded'
) {
return {
balance: '0',
chainId: this.chainId,
Expand Down
2 changes: 1 addition & 1 deletion packages/swapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@shapeshiftoss/caip": "workspace:^",
"@shapeshiftoss/chain-adapters": "workspace:^",
"@shapeshiftoss/contracts": "workspace:^",
"@shapeshiftoss/hdwallet-core": "1.62.35-near-chain.3",
"@shapeshiftoss/hdwallet-core": "1.62.35-near-chain.4",
"@shapeshiftoss/types": "workspace:^",
"@shapeshiftoss/unchained-client": "workspace:^",
"@shapeshiftoss/utils": "workspace:^",
Expand Down
Loading