Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bchainhub/go-ican
Golang ICAN Addresses validation
https://github.com/bchainhub/go-ican
bcan core-blockchain ican
Last synced: about 11 hours ago
JSON representation
Golang ICAN Addresses validation
- Host: GitHub
- URL: https://github.com/bchainhub/go-ican
- Owner: bchainhub
- License: other
- Created: 2020-07-14T16:27:09.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-19T16:51:39.000Z (over 2 years ago)
- Last Synced: 2024-06-21T06:29:21.258Z (5 months ago)
- Topics: bcan, core-blockchain, ican
- Language: Go
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Go-ICAN
### Basic Golang ICAN validator
Validations:
- Validate if country/crypto code and check digits are present
- Validate if country/crypto code is in accepted country code list
- Validate national BCAN code format
- Validate mod97 check digits#### Testing
Test suite includes example of ICAN's for most countries and fake ICAN's. Errors are as specific as possible.#### Example
package main
import (
"fmt"
"github.com/cryptohub-digital/go-ican"
)func main() {
ican, err := ican.NewICAN("NL40ABNA0517552264")if err != nil {
fmt.Printf("%v\n", err)
} else {
fmt.Printf("%v\n", ican.PrintCode)
fmt.Printf("%v\n", ican.Code)
}
}## License
[CORE License](LICENSE)