├── example
├── ios
│ ├── Runner
│ │ ├── Runner-Bridging-Header.h
│ │ ├── Assets.xcassets
│ │ │ ├── LaunchImage.imageset
│ │ │ │ ├── LaunchImage.png
│ │ │ │ ├── LaunchImage@2x.png
│ │ │ │ ├── LaunchImage@3x.png
│ │ │ │ ├── README.md
│ │ │ │ └── Contents.json
│ │ │ └── AppIcon.appiconset
│ │ │ │ ├── Icon-App-20x20@1x.png
│ │ │ │ ├── Icon-App-20x20@2x.png
│ │ │ │ ├── Icon-App-20x20@3x.png
│ │ │ │ ├── Icon-App-29x29@1x.png
│ │ │ │ ├── Icon-App-29x29@2x.png
│ │ │ │ ├── Icon-App-29x29@3x.png
│ │ │ │ ├── Icon-App-40x40@1x.png
│ │ │ │ ├── Icon-App-40x40@2x.png
│ │ │ │ ├── Icon-App-40x40@3x.png
│ │ │ │ ├── Icon-App-60x60@2x.png
│ │ │ │ ├── Icon-App-60x60@3x.png
│ │ │ │ ├── Icon-App-76x76@1x.png
│ │ │ │ ├── Icon-App-76x76@2x.png
│ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ │ └── Contents.json
│ │ ├── AppDelegate.swift
│ │ ├── Base.lproj
│ │ │ ├── Main.storyboard
│ │ │ └── LaunchScreen.storyboard
│ │ └── Info.plist
│ ├── Flutter
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── AppFrameworkInfo.plist
│ ├── Runner.xcodeproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── .gitignore
│ ├── Podfile
│ └── Podfile.lock
├── android
│ ├── app
│ │ ├── src
│ │ │ ├── main
│ │ │ │ ├── res
│ │ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── drawable
│ │ │ │ │ │ └── launch_background.xml
│ │ │ │ │ └── values
│ │ │ │ │ │ └── styles.xml
│ │ │ │ ├── kotlin
│ │ │ │ │ └── io
│ │ │ │ │ │ └── polkawallet
│ │ │ │ │ │ └── www
│ │ │ │ │ │ └── example
│ │ │ │ │ │ └── MainActivity.kt
│ │ │ │ └── AndroidManifest.xml
│ │ │ ├── debug
│ │ │ │ └── AndroidManifest.xml
│ │ │ └── profile
│ │ │ │ └── AndroidManifest.xml
│ │ └── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ ├── .gitignore
│ ├── settings.gradle
│ └── build.gradle
├── .metadata
├── README.md
├── .gitignore
├── lib
│ └── pages
│ │ └── dAppPage.dart
└── pubspec.yaml
├── js_api
├── .yarnrc.yml
├── src
│ ├── service
│ │ ├── walletconnect
│ │ │ ├── v1
│ │ │ │ ├── constants
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── default.ts
│ │ │ │ │ └── chains.ts
│ │ │ │ └── helpers
│ │ │ │ │ ├── wallet.ts
│ │ │ │ │ └── api.ts
│ │ │ ├── v2
│ │ │ │ ├── helpers
│ │ │ │ │ └── wallet.ts
│ │ │ │ └── data
│ │ │ │ │ ├── RelayerRegions.ts
│ │ │ │ │ ├── PolkadotData.ts
│ │ │ │ │ └── EIP155Data.ts
│ │ │ └── engines
│ │ │ │ └── index.ts
│ │ ├── assets.ts
│ │ ├── multiChain.ts
│ │ ├── staking
│ │ │ └── inflation.ts
│ │ ├── eth
│ │ │ ├── account.ts
│ │ │ └── settings.ts
│ │ └── setting.ts
│ ├── bridge.ts
│ ├── utils
│ │ ├── config
│ │ │ ├── links
│ │ │ │ ├── index.ts
│ │ │ │ ├── commonwealth.ts
│ │ │ │ ├── subscan.ts
│ │ │ │ ├── polkascan.ts
│ │ │ │ ├── subsquare.ts
│ │ │ │ └── polkassembly.ts
│ │ │ └── config.ts
│ │ └── bip39Util.ts
│ └── types
│ │ └── scannerTypes.ts
├── .yarnrc
├── .gitignore
├── test
│ └── index.html
├── babel.config.js
├── README.md
├── tsconfig.json
└── webpack.config.js
├── js_as_extension
├── dist
│ ├── index.html
│ └── main.js.LICENSE.txt
├── babel.config.js
├── webpack.config.js
├── package.json
└── src
│ ├── index.js
│ └── handlers.js
├── .gitmodules
├── .gitattributes
├── assets
├── index.html
└── bridge.html
├── lib
├── api
│ ├── types
│ │ ├── staking
│ │ │ ├── accountBondedInfo.dart
│ │ │ └── ownStashInfo.dart
│ │ ├── verifyResult.dart
│ │ ├── parachain
│ │ │ ├── bidData.dart
│ │ │ ├── parasOverviewData.dart
│ │ │ ├── fundData.dart
│ │ │ ├── bidData.g.dart
│ │ │ ├── parasOverviewData.g.dart
│ │ │ ├── auctionData.dart
│ │ │ ├── fundData.g.dart
│ │ │ └── auctionData.g.dart
│ │ ├── uosQrParseResultData.dart
│ │ ├── gov
│ │ │ ├── genExternalLinksParams.dart
│ │ │ ├── councilInfoData.dart
│ │ │ ├── genExternalLinksParams.g.dart
│ │ │ ├── treasuryTipData.dart
│ │ │ ├── proposalInfoData.dart
│ │ │ ├── councilInfoData.g.dart
│ │ │ ├── treasuryTipData.g.dart
│ │ │ ├── proposalInfoData.g.dart
│ │ │ └── referendumInfoData.dart
│ │ ├── bridge
│ │ │ ├── bridgeTxParams.dart
│ │ │ ├── bridgeTxParams.g.dart
│ │ │ ├── bridgeChainData.dart
│ │ │ ├── bridgeTokenBalance.dart
│ │ │ ├── bridgeChainData.g.dart
│ │ │ └── bridgeTokenBalance.g.dart
│ │ ├── networkStateData.dart
│ │ ├── networkParams.dart
│ │ ├── recoveryInfo.dart
│ │ ├── verifyResult.g.dart
│ │ ├── uosQrParseResultData.g.dart
│ │ ├── addressIconData.dart
│ │ ├── networkParams.g.dart
│ │ ├── txData.dart
│ │ ├── networkStateData.g.dart
│ │ ├── addressIconData.g.dart
│ │ ├── txData.g.dart
│ │ ├── evmTxData.dart
│ │ ├── txInfoData.dart
│ │ ├── balanceData.dart
│ │ ├── walletConnect
│ │ │ ├── payloadData.dart
│ │ │ ├── payloadData.g.dart
│ │ │ └── pairingData.dart
│ │ ├── txInfoData.g.dart
│ │ ├── evmTxData.g.dart
│ │ └── balanceData.g.dart
│ ├── eth
│ │ └── index.dart
│ ├── apiParachain.dart
│ ├── apiUOS.dart
│ ├── apiSetting.dart
│ ├── apiAssets.dart
│ ├── apiGov2.dart
│ ├── apiRecovery.dart
│ ├── apiTx.dart
│ ├── apiStaking.dart
│ └── apiAccount.dart
├── utils
│ ├── index.dart
│ ├── app.dart
│ └── i18n.dart
├── service
│ ├── eth
│ │ ├── index.dart
│ │ ├── rpcApi.dart
│ │ └── accountEth.dart
│ ├── assets.dart
│ ├── localServer.dart
│ ├── parachain.dart
│ ├── uos.dart
│ ├── setting.dart
│ ├── gov2.dart
│ ├── tx.dart
│ ├── recovery.dart
│ ├── staking.dart
│ ├── account.dart
│ └── index.dart
├── plugin
│ └── homeNavItem.dart
├── consts
│ └── settings.dart
├── storage
│ ├── types
│ │ ├── ethWalletData.dart
│ │ ├── keyPairData.dart
│ │ ├── ethWalletData.g.dart
│ │ └── keyPairData.g.dart
│ └── localStorage.dart
├── webviewWithExtension
│ └── types
│ │ └── signExtrinsicParam.dart
└── polkawallet_sdk.dart
├── .github
├── ISSUE_TEMPLATE
│ ├── feature_request.md
│ └── bug_report.md
└── workflows
│ ├── publish.yml
│ └── dart.yml
├── .gitignore
├── .pubignore
├── test
└── polkawallet_sdk_test.dart
└── pubspec.yaml
/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/js_api/.yarnrc.yml:
--------------------------------------------------------------------------------
1 | nodeLinker: node-modules
2 |
3 | yarnPath: .yarn/releases/yarn-3.2.1.cjs
4 |
--------------------------------------------------------------------------------
/js_api/src/service/walletconnect/v1/constants/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./chains";
2 | export * from "./default";
3 |
--------------------------------------------------------------------------------
/js_as_extension/dist/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "mobile-provider"]
2 | path = mobile-provider
3 | url = git@github.com:RomeroYang/mobile-provider.git
4 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | js_api/.yarn/releases/** binary
2 | js_api/.yarn/plugins/** binary
3 | js_api/dist/** binary
4 | assets/*.js binary
5 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/js_api/.yarnrc:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | yarn-path ".yarn/releases/yarn-1.22.19.cjs"
6 |
--------------------------------------------------------------------------------
/js_api/src/service/walletconnect/v1/helpers/wallet.ts:
--------------------------------------------------------------------------------
1 | export const notifyWallet = (data: any) => {
2 | (window).send("wallet_connect_message", data);
3 | };
4 |
--------------------------------------------------------------------------------
/js_api/src/service/walletconnect/v2/helpers/wallet.ts:
--------------------------------------------------------------------------------
1 | export const notifyWallet = (data: any) => {
2 | (window).send("wallet_connect_message_v2", data);
3 | };
4 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 | # android.enableBuildCache=false
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/js_api/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 |
3 | .yarn/*
4 | !.yarn/patches
5 | !.yarn/plugins
6 | !.yarn/releases
7 | !.yarn/sdks
8 | !.yarn/versions
9 |
10 | *.log
11 |
12 | src/config.local.ts
13 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polkawallet-io/sdk/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/android/app/src/main/kotlin/io/polkawallet/www/example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package io.polkawallet.www.example
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/assets/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | polkadot-js/api runner
8 |
9 |
10 |
--------------------------------------------------------------------------------
/assets/bridge.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | polkawallet bridge js runner
8 |
9 |
10 |
--------------------------------------------------------------------------------
/js_as_extension/dist/main.js.LICENSE.txt:
--------------------------------------------------------------------------------
1 | /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
2 |
3 | /*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */
4 |
5 | /*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
6 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | android.enableR8=true
7 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/js_api/src/bridge.ts:
--------------------------------------------------------------------------------
1 | import bridge from "./service/bridge";
2 |
3 | // console.log will send message to MsgChannel to App
4 | function send(path: string, data: any) {
5 | console.log(JSON.stringify({ path, data }));
6 | }
7 | send("log", "bridge js loaded");
8 | (window).send = send;
9 |
10 | (window).bridge = bridge;
--------------------------------------------------------------------------------
/js_api/test/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/example/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/lib/api/types/staking/accountBondedInfo.dart:
--------------------------------------------------------------------------------
1 | class AccountBondedInfo {
2 | AccountBondedInfo(this.pubKey, this.controllerId, this.stashId);
3 | final String? pubKey;
4 | // controllerId != null, means the account is a stash
5 | final String? controllerId;
6 | // stashId != null, means the account is a controller
7 | final String? stashId;
8 | }
--------------------------------------------------------------------------------
/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: bbfbf1770cca2da7c82e887e4e4af910034800b6
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/lib/utils/index.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:convert/convert.dart';
4 |
5 | class Encrypt {
6 | static String passwordToEncryptKey(String password) {
7 | String passHex = hex.encode(utf8.encode(password));
8 | if (passHex.length > 32) {
9 | return passHex.substring(0, 32);
10 | }
11 | return passHex.padRight(32, '0');
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/lib/utils/app.dart:
--------------------------------------------------------------------------------
1 | class AppUtils {
2 | /// The App will set this function for plugins switch between each other
3 | /// accountType(0:Substrate,1:evm)
4 | Future Function(String network,
5 | {PageRouteParams? pageRoute, int accountType})? switchNetwork;
6 | }
7 |
8 | class PageRouteParams {
9 | PageRouteParams(this.path, {this.args});
10 |
11 | final String path;
12 | final Map? args;
13 | }
14 |
--------------------------------------------------------------------------------
/js_as_extension/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | assumptions: { setPublicClassFields: true, privateFieldsAsProperties: true },
3 | presets: [["@babel/preset-env", { modules: false }]],
4 | plugins: [
5 | "@babel/plugin-proposal-private-methods",
6 | "@babel/plugin-proposal-class-properties",
7 | "@babel/plugin-transform-runtime",
8 | "@babel/plugin-transform-classes",
9 | "@babel/plugin-transform-modules-commonjs",
10 | ],
11 | };
12 |
--------------------------------------------------------------------------------
/lib/api/types/verifyResult.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 |
3 | part 'verifyResult.g.dart';
4 |
5 | @JsonSerializable()
6 | class VerifyResult extends _VerifyResult {
7 | static VerifyResult fromJson(Map json) =>
8 | _$VerifyResultFromJson(json);
9 | Map toJson() => _$VerifyResultToJson(this);
10 | }
11 |
12 | abstract class _VerifyResult {
13 | String? crypto;
14 | bool? isValid;
15 | }
16 |
--------------------------------------------------------------------------------
/js_api/src/utils/config/links/index.ts:
--------------------------------------------------------------------------------
1 | import Commonwealth from "./commonwealth";
2 | import Polkascan from "./polkascan";
3 | import { PolkassemblyIo, PolkassemblyNetwork } from "./polkassembly";
4 | import Subscan from "./subscan";
5 | import SubSquare from "./subsquare";
6 |
7 | const externals = {
8 | Commonwealth,
9 | Polkascan,
10 | Polkassembly: PolkassemblyIo,
11 | PolkassemblyNetwork,
12 | Subscan,
13 | SubSquare,
14 | };
15 |
16 | export default externals;
17 |
--------------------------------------------------------------------------------
/lib/service/eth/index.dart:
--------------------------------------------------------------------------------
1 | import 'package:polkawallet_sdk/service/eth/accountEth.dart';
2 | import 'package:polkawallet_sdk/service/eth/keyringEth.dart';
3 | import 'package:polkawallet_sdk/service/index.dart';
4 |
5 | class ServiceEth {
6 | ServiceEth(SubstrateService serviceRoot) {
7 | account = ServiceAccountEth(serviceRoot);
8 | keyring = ServiceKeyringEth(serviceRoot);
9 | }
10 |
11 | late ServiceAccountEth account;
12 | late ServiceKeyringEth keyring;
13 | }
14 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/lib/api/types/parachain/bidData.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 |
3 | part 'bidData.g.dart';
4 |
5 | @JsonSerializable()
6 | class BidData extends _BidData {
7 | static BidData fromJson(Map json) => _$BidDataFromJson(json as Map);
8 | Map toJson() => _$BidDataToJson(this);
9 | }
10 |
11 | abstract class _BidData {
12 | String? paraId;
13 | int? firstSlot;
14 | int? lastSlot;
15 | bool? isCrowdloan;
16 | dynamic value;
17 | }
18 |
--------------------------------------------------------------------------------
/js_api/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | assumptions: { setPublicClassFields: true, privateFieldsAsProperties: true },
3 | presets: [["@babel/preset-env", { modules: false, useBuiltIns: "usage", corejs: "3.33.2" }], "@babel/preset-typescript"],
4 | plugins: [
5 | "@babel/plugin-proposal-private-methods",
6 | "@babel/plugin-proposal-class-properties",
7 | "@babel/plugin-transform-classes",
8 | "@babel/plugin-transform-runtime",
9 | ],
10 | sourceType: "unambiguous",
11 | };
12 |
--------------------------------------------------------------------------------
/js_api/src/service/assets.ts:
--------------------------------------------------------------------------------
1 | import { ApiPromise } from "@polkadot/api";
2 |
3 | /**
4 | * get assets ids of statemine/statemint network.
5 | */
6 | async function getAssetsAll(api: ApiPromise) {
7 | const entries = await api.query.assets.metadata.entries();
8 | return entries
9 | .map(([{ args: [assetId] }, data]) => ({
10 | id: assetId.toNumber(),
11 | ...data.toHuman(),
12 | }))
13 | .sort((a, b) => a.id - b.id);
14 | }
15 |
16 | export default {
17 | getAssetsAll,
18 | };
19 |
--------------------------------------------------------------------------------
/js_api/src/service/walletconnect/v1/constants/default.ts:
--------------------------------------------------------------------------------
1 | export const ETH_STANDARD_PATH = "m/44'/60'/0'/0";
2 |
3 | export const MAINNET_CHAIN_ID = 1;
4 | export const GOERLI_CHAIN_ID = 5;
5 | export const DEFAULT_CHAIN_ID = GOERLI_CHAIN_ID;
6 |
7 | export const DEFAULT_WALLET_CLIENT = {
8 | description: "Mobile wallet for Dotsama eco.",
9 | url: "https://polkawallet.io",
10 | icons: ["https://raw.githubusercontent.com/polkawallet-io/app/master/assets/images/icon.png"],
11 | name: "Polkawallet",
12 | };
13 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/js_api/src/types/scannerTypes.ts:
--------------------------------------------------------------------------------
1 | import { SubmittableExtrinsic } from "@polkadot/api/types";
2 | import { SignerPayloadJSON } from "@polkadot/types/types";
3 |
4 | export type QRSigner = {
5 | completedFramesCount: number;
6 | multipartData: any[];
7 | multipartComplete: boolean;
8 | totalFrameCount: number;
9 | latestFrame: number;
10 | missedFrames: any[];
11 | unsignedData: any;
12 | };
13 |
14 | export type QRSubmittable = {
15 | tx: SubmittableExtrinsic<"promise">;
16 | payload: SignerPayloadJSON;
17 | };
18 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/lib/api/eth/index.dart:
--------------------------------------------------------------------------------
1 | import 'package:polkawallet_sdk/api/api.dart';
2 | import 'package:polkawallet_sdk/api/eth/apiAccountEth.dart';
3 | import 'package:polkawallet_sdk/api/eth/apiKeyringEth.dart';
4 | import 'package:polkawallet_sdk/service/eth/index.dart';
5 |
6 | class ApiEth {
7 | ApiEth(PolkawalletApi apiRoot, ServiceEth service) {
8 | account = ApiAccountEth(apiRoot, service.account);
9 | keyring = ApiKeyringEth(apiRoot, service.keyring);
10 | }
11 |
12 | late ApiAccountEth account;
13 | late ApiKeyringEth keyring;
14 | }
15 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/api/types/uosQrParseResultData.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 |
3 | part 'uosQrParseResultData.g.dart';
4 |
5 | @JsonSerializable()
6 | class UosQrParseResultData extends _UosQrParseResultData {
7 | static UosQrParseResultData fromJson(Map json) =>
8 | _$UosQrParseResultDataFromJson(json);
9 | Map toJson() => _$UosQrParseResultDataToJson(this);
10 | }
11 |
12 | abstract class _UosQrParseResultData {
13 | String? error;
14 | String? signer;
15 | String? genesisHash;
16 | }
17 |
--------------------------------------------------------------------------------
/lib/api/types/gov/genExternalLinksParams.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 |
3 | part 'genExternalLinksParams.g.dart';
4 |
5 | @JsonSerializable()
6 | class GenExternalLinksParams extends _GenExternalLinksParams {
7 | static GenExternalLinksParams fromJson(Map json) =>
8 | _$GenExternalLinksParamsFromJson(json);
9 | Map toJson() => _$GenExternalLinksParamsToJson(this);
10 | }
11 |
12 | class _GenExternalLinksParams {
13 | String? data;
14 | String? hash;
15 | String? type;
16 | bool? withShort;
17 | }
18 |
--------------------------------------------------------------------------------
/lib/api/types/parachain/parasOverviewData.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 |
3 | part 'parasOverviewData.g.dart';
4 |
5 | @JsonSerializable(explicitToJson: true)
6 | class ParasOverviewData extends _ParasOverviewData {
7 | static ParasOverviewData fromJson(Map json) =>
8 | _$ParasOverviewDataFromJson(json as Map);
9 | Map toJson() => _$ParasOverviewDataToJson(this);
10 | }
11 |
12 | abstract class _ParasOverviewData {
13 | int parasCount = 0;
14 | int currentLease = 0;
15 | int leaseLength = 0;
16 | int leaseProgress = 0;
17 | }
18 |
--------------------------------------------------------------------------------
/lib/service/eth/rpcApi.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:http/http.dart';
4 |
5 | const post_headers = {"Content-type": "application/json", "Accept": "*/*"};
6 |
7 | class EvmRpcApi {
8 | static Future