chore(code-samples): remove all emojis

This commit is contained in:
banasa44
2025-08-25 11:27:50 +02:00
committed by akcodez
parent b94d5343bc
commit 1f3e1ee670
40 changed files with 1125 additions and 1123 deletions

View File

@@ -1,16 +1,16 @@
package main
import (
"encoding/hex"
"fmt"
"time"
"encoding/hex"
"fmt"
"time"
"github.com/Peersyst/xrpl-go/examples/clients"
"github.com/Peersyst/xrpl-go/pkg/crypto"
rippleTime "github.com/Peersyst/xrpl-go/xrpl/time"
"github.com/Peersyst/xrpl-go/xrpl/transaction"
"github.com/Peersyst/xrpl-go/xrpl/transaction/types"
"github.com/Peersyst/xrpl-go/xrpl/wallet"
"github.com/Peersyst/xrpl-go/examples/clients"
"github.com/Peersyst/xrpl-go/pkg/crypto"
rippleTime "github.com/Peersyst/xrpl-go/xrpl/time"
"github.com/Peersyst/xrpl-go/xrpl/transaction"
"github.com/Peersyst/xrpl-go/xrpl/transaction/types"
"github.com/Peersyst/xrpl-go/xrpl/wallet"
)
func main() {
@@ -20,47 +20,47 @@ func main() {
// Configure wallets
// Issuer
fmt.Println("Setting up credential issuer wallet...")
fmt.Println("Setting up credential issuer wallet...")
issuer, err := wallet.New(crypto.ED25519())
if err != nil {
fmt.Printf("Error creating issuer wallet: %s\n", err)
fmt.Printf("Error creating issuer wallet: %s\n", err)
return
}
err = client.FundWallet(&issuer)
if err != nil {
fmt.Printf("Error funding issuer wallet: %s\n", err)
fmt.Printf("Error funding issuer wallet: %s\n", err)
return
}
fmt.Printf("Issuer wallet funded: %s\n", issuer.ClassicAddress)
fmt.Printf("Issuer wallet funded: %s\n", issuer.ClassicAddress)
// -----------------------------------------------------
// Subject (destination)
fmt.Println("Setting up Subject wallet...")
fmt.Println("Setting up Subject wallet...")
subjectWallet, err := wallet.New(crypto.ED25519())
if err != nil {
fmt.Printf("Error creating subject wallet: %s\n", err)
fmt.Printf("Error creating subject wallet: %s\n", err)
return
}
err = client.FundWallet(&subjectWallet)
if err != nil {
fmt.Printf("Error funding subject wallet: %s\n", err)
fmt.Printf("Error funding subject wallet: %s\n", err)
return
}
fmt.Printf("Subject wallet funded: %s\n", subjectWallet.ClassicAddress)
fmt.Printf("Subject wallet funded: %s\n", subjectWallet.ClassicAddress)
// -----------------------------------------------------
// Creating the CredentialCreate transaction
fmt.Println("Creating CredentialCreate transaction...")
fmt.Println("Creating CredentialCreate transaction...")
expiration, err := rippleTime.IsoTimeToRippleTime(time.Now().Add(time.Hour * 24).Format(time.RFC3339))
credentialType := types.CredentialType("6D795F63726564656E7469616C")
if err != nil {
fmt.Printf("Error converting expiration to ripple time: %s\n", err)
fmt.Printf("Error converting expiration to ripple time: %s\n", err)
return
}
@@ -79,7 +79,7 @@ func main() {
// -----------------------------------------------------
// Creating the CredentialAccept transaction
fmt.Println("Creating CredentialAccept transaction...")
fmt.Println("Creating CredentialAccept transaction...")
acceptTxn := &transaction.CredentialAccept{
BaseTx: transaction.BaseTx{
@@ -94,7 +94,7 @@ func main() {
// -----------------------------------------------------
// Creating the CredentialDelete transaction
fmt.Println("Creating CredentialDelete transaction...")
fmt.Println("Creating CredentialDelete transaction...")
deleteTxn := &transaction.CredentialDelete{
BaseTx: transaction.BaseTx{

View File

@@ -1,21 +1,21 @@
package main
import (
"encoding/hex"
"fmt"
"time"
"encoding/hex"
"fmt"
"time"
"github.com/Peersyst/xrpl-go/examples/clients"
"github.com/Peersyst/xrpl-go/pkg/crypto"
rippleTime "github.com/Peersyst/xrpl-go/xrpl/time"
"github.com/Peersyst/xrpl-go/xrpl/transaction"
"github.com/Peersyst/xrpl-go/xrpl/transaction/types"
"github.com/Peersyst/xrpl-go/xrpl/wallet"
"github.com/Peersyst/xrpl-go/examples/clients"
"github.com/Peersyst/xrpl-go/pkg/crypto"
rippleTime "github.com/Peersyst/xrpl-go/xrpl/time"
"github.com/Peersyst/xrpl-go/xrpl/transaction"
"github.com/Peersyst/xrpl-go/xrpl/transaction/types"
"github.com/Peersyst/xrpl-go/xrpl/wallet"
)
func main() {
fmt.Println("Setting up client...")
fmt.Println("Setting up client...")
client := clients.GetDevnetWebsocketClient()
fmt.Println("Connecting to server...")
@@ -24,7 +24,7 @@ func main() {
return
}
fmt.Println("Client configured!")
fmt.Println("Client configured!")
fmt.Println()
fmt.Printf("Connection: %t", client.IsConnected())
@@ -33,47 +33,47 @@ func main() {
// Configure wallets
// Issuer
fmt.Println("Setting up credential issuer wallet...")
fmt.Println("Setting up credential issuer wallet...")
issuer, err := wallet.New(crypto.ED25519())
if err != nil {
fmt.Printf("Error creating issuer wallet: %s\n", err)
fmt.Printf("Error creating issuer wallet: %s\n", err)
return
}
err = client.FundWallet(&issuer)
if err != nil {
fmt.Printf("Error funding issuer wallet: %s\n", err)
fmt.Printf("Error funding issuer wallet: %s\n", err)
return
}
fmt.Printf("Issuer wallet funded: %s\n", issuer.ClassicAddress)
fmt.Printf("Issuer wallet funded: %s\n", issuer.ClassicAddress)
// -----------------------------------------------------
// Subject (destination)
fmt.Println("Setting up Subject wallet...")
fmt.Println("Setting up Subject wallet...")
subjectWallet, err := wallet.New(crypto.ED25519())
if err != nil {
fmt.Printf("Error creating subject wallet: %s\n", err)
fmt.Printf("Error creating subject wallet: %s\n", err)
return
}
err = client.FundWallet(&subjectWallet)
if err != nil {
fmt.Printf("Error funding subject wallet: %s\n", err)
fmt.Printf("Error funding subject wallet: %s\n", err)
return
}
fmt.Printf("Subject wallet funded: %s\n", subjectWallet.ClassicAddress)
fmt.Printf("Subject wallet funded: %s\n", subjectWallet.ClassicAddress)
// -----------------------------------------------------
// Creating the CredentialCreate transaction
fmt.Println("Creating CredentialCreate transaction...")
fmt.Println("Creating CredentialCreate transaction...")
expiration, err := rippleTime.IsoTimeToRippleTime(time.Now().Add(time.Hour * 24).Format(time.RFC3339))
credentialType := types.CredentialType("6D795F63726564656E7469616C")
if err != nil {
fmt.Printf("Error converting expiration to ripple time: %s\n", err)
fmt.Printf("Error converting expiration to ripple time: %s\n", err)
return
}
@@ -92,7 +92,7 @@ func main() {
// -----------------------------------------------------
// Creating the CredentialAccept transaction
fmt.Println("Creating CredentialAccept transaction...")
fmt.Println("Creating CredentialAccept transaction...")
acceptTxn := &transaction.CredentialAccept{
BaseTx: transaction.BaseTx{
@@ -107,7 +107,7 @@ func main() {
// -----------------------------------------------------
// Creating the CredentialDelete transaction
fmt.Println("Creating CredentialDelete transaction...")
fmt.Println("Creating CredentialDelete transaction...")
deleteTxn := &transaction.CredentialDelete{
BaseTx: transaction.BaseTx{