forked from kin-labs/kinetic-dart-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into v1.0.0-rc.13
- Loading branch information
Showing
11 changed files
with
155 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Flutter Package | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: 3.22.2 | ||
|
||
- name: Install dependencies | ||
run: flutter pub get | ||
|
||
# - name: Run tests | ||
# run: flutter test | ||
|
||
- name: Create credentials.json | ||
env: | ||
PUBDEV_TOKEN: ${{ secrets.PUBDEV_TOKEN }} | ||
run: | | ||
# Set the configuration path | ||
CONFIG_PATH="${XDG_CONFIG_HOME:-$HOME/.config}/dart" | ||
# Ensure the directory exists | ||
mkdir -p "$CONFIG_PATH" | ||
# Write the credentials to the appropriate location | ||
echo "$PUBDEV_TOKEN" > "$CONFIG_PATH/pub-credentials.json" | ||
# Verify the file was created correctly | ||
cat "$CONFIG_PATH/pub-credentials.json" | ||
- name: Publish to pub.dev (dry run) | ||
run: flutter pub publish --dry-run | ||
|
||
- name: Publish to pub.dev | ||
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
run: flutter pub publish --force |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import 'package:kinetic/helpers/get_public_key.dart'; | ||
import 'package:solana/solana.dart'; | ||
|
||
// Function with 2 params | ||
Future<String> getTokenAddress({ | ||
required String account, | ||
required String mint, | ||
}) async { | ||
final address = await findAssociatedTokenAddress(mint: getPublicKey(mint), owner: getPublicKey(account)); | ||
|
||
return address.toString(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class PrepareTransactionResponse { | ||
final String blockhash; | ||
final int lastValidBlockHeight; | ||
PrepareTransactionResponse({required this.blockhash, required this.lastValidBlockHeight}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.