Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ğecko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
Ğecko
Commits
d38cabe1
Commit
d38cabe1
authored
2 years ago
by
poka
Browse files
Options
Downloads
Patches
Plain Diff
wip indexer
parent
7f83965a
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
lib/main.dart
+2
-1
2 additions, 1 deletion
lib/main.dart
lib/models/queries_indexer.dart
+69
-0
69 additions, 0 deletions
lib/models/queries_indexer.dart
lib/providers/wallet_options.dart
+3
-0
3 additions, 0 deletions
lib/providers/wallet_options.dart
pubspec.yaml
+1
-1
1 addition, 1 deletion
pubspec.yaml
with
75 additions
and
2 deletions
lib/main.dart
+
2
−
1
View file @
d38cabe1
...
...
@@ -80,7 +80,8 @@ Future<void> main() async {
}
// log.d(await configBox.get('endpoint'));
const
indexerEndpoint
=
"http://192.168.1.72:8080/v1/graphql"
;
// const indexerEndpoint = "http://192.168.1.72:8080/v1/graphql";
const
indexerEndpoint
=
"https://duniter-indexer.coinduf.eu/v1/graphql"
;
HttpOverrides
.
global
=
MyHttpOverrides
();
...
...
This diff is collapsed.
Click to expand it.
lib/models/queries_indexer.dart
+
69
−
0
View file @
d38cabe1
...
...
@@ -7,3 +7,72 @@ query ($address: String!) {
}
}
'''
;
const
String
searchAddressByNameQ
=
r''
'
query (
$name
: String!) {
search_identity(args: {name:
$name
}) {
id
name
}
}
'''
;
const
String
getHistoryByAddressQ
=
r''
'
query (
$address
: String!) {
account_by_pk(id: "5CQ8T4qpbYJq7uVsxGPQ5q2df7x3Wa4aRY6HUWMBYjfLZhnn") {
transactions_issued {
receiver_id
amount
created_at
created_on
}
transactions_received {
issuer_id
amount
created_at
created_on
}
}
}
'''
;
const
String
getHistoryByAddressQ2
=
r''
'
query (
$address
: String!) {
{
transaction(where: {_or: [{issuer_id: {_eq:
$address
}},
{receiver_id: {_eq:
$address
}}]}, order_by: {created_at: desc})
{
amount
created_at
issuer_id
receiver_id
}
}
}
'''
;
const
String
getHistoryByAddressQ3
=
r''
'
query (
$address
: String!) {
transaction_connection(where:
{_or: [
{issuer_id: {_eq:
$address
}},
{receiver_id: {_eq:
$address
}}
]},
order_by: {created_at: desc}) {
edges {
node {
amount
created_at
issuer_id
receiver_id
}
}
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
}
}
'''
;
This diff is collapsed.
Click to expand it.
lib/providers/wallet_options.dart
+
3
−
0
View file @
d38cabe1
...
...
@@ -147,6 +147,9 @@ class WalletOptionsProvider with ChangeNotifier {
);
}
log
.
d
(
'bbbbbbbbbbbb: '
+
DateTime
.
parse
(
"2022-06-13T16:51:24.001+00:00"
)
.
toString
());
return
Consumer
<
SubstrateSdk
>(
builder:
(
context
,
_sub
,
_
)
{
return
FutureBuilder
(
future:
_sub
.
idtyStatus
(
address
),
...
...
This diff is collapsed.
Click to expand it.
pubspec.yaml
+
1
−
1
View file @
d38cabe1
...
...
@@ -5,7 +5,7 @@ description: Pay with G1.
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to
:
'
none'
# Remove this line if you wish to publish to pub.dev
version
:
0.0.
8+9
version
:
0.0.
9+1
environment
:
sdk
:
'
>=2.12.0
<3.0.0'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment